Skip to content

windows-latest - unpublished version ✅ refs/heads/test-v3 ✅ milankomaj ✅ workflow_dispatch #161

windows-latest - unpublished version ✅ refs/heads/test-v3 ✅ milankomaj ✅ workflow_dispatch

windows-latest - unpublished version ✅ refs/heads/test-v3 ✅ milankomaj ✅ workflow_dispatch #161

name: windows-latest - unpublished version
run-name: ${{ github.workflow }} ✅ ${{ github.ref }} ✅ ${{ github.actor }} ✅ ${{ github.event_name}}
on:
workflow_dispatch:
jobs:
Shell:
name: Shell
continue-on-error: false
strategy:
fail-fast: false
max-parallel: 3
matrix:
include:
- shell: cmd
- shell: powershell
- shell: pwsh
- shell: bash
- shell: sh
runs-on: windows-latest
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- name: checkout ${{ github.ref }}
id: checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: 💡 example before comands
id: systemsetup
run: |
echo ${{ matrix.shell }}
- name: 💡💡 unpublished version shell-x@v0.3
if: ${{ matrix.shell == 'bash' || matrix.shell == 'sh' }}
id: UNIX
uses: milankomaj/shell-x@test-v3
with:
shell: ${{ matrix.shell }}
locale: sk_SK.utf8
timezone: Europe/Bratislava
comand: date && echo ${{ runner.os }}
- name: 💡 unpublished version shell-x@v0.3
if: ${{ steps.UNIX.outcome == 'skipped'}}
id: shell
uses: milankomaj/shell-x@test-v3
with:
shell: ${{ matrix.shell }}
locale: sk-SK
timezone: Central Europe Standard Time
- name: 💡 example after cmd comands
if: ${{ matrix.shell == 'cmd' }}
id: cmd
run: |
echo ::group::example
tzutil /g & echo.
echo %date%-%time% & echo.
systeminfo & echo.
echo ::endgroup::
- name: 💡 example after powershell comands
if: ${{ matrix.shell == 'powershell' }}
id: powershell
run: |
Get-TimeZone
Get-Date -UFormat "%A %m/%d/%Y %R %Z"
- name: 💡 example after pwsh comands
if: ${{ matrix.shell == 'pwsh' }}
id: pwsh
run: |
Get-Date && Get-Date -Format F
- name: 💡 example after bash&sh comands
if: ${{ matrix.shell == 'bash' || matrix.shell == 'sh' }}
id: mixed
run: |
uname -a
locale
echo ----------
date
date +"%T, timezone %Z (%z)"
echo ----------
export TZ=Europe/Bratislava
date
date +"%T, timezone %Z (%z)"
echo ----------
export TZ=CET-1CEST
date
date +"%T, timezone %Z (%z)"
echo ----------
export TZ=GMT0
date
date +"%T, timezone %Z (%z)"
echo ----------
export TZ='MET-1MET DST,M3.5.0/2,M10.5.0/3'
date
date +"%T, timezone %Z (%z)"
echo ----------
tzset
echo ----------
echo bash.bashrc
cat /etc/bash.bashrc
echo ----------
echo lang.sh
cat /etc/profile.d/lang.sh
echo ----------
echo env.sh
cat /etc/profile.d/env.sh
echo ----------
echo git-prompt.sh
cat /etc/profile.d/git-prompt.sh
echo ----------
echo profile
cat /etc/profile
echo ----------
echo bash_profile.sh
cat /etc/profile.d/bash_profile.sh
echo ----------
echo ls
ls ~/
- name: 💡 outcome steps
if: ${{ always() }}
shell: bash
id: outcome
run: |
echo "shell-outcome = ${{ steps.shell.outcome }}"
echo "UNIX-outcome = ${{ steps.UNIX.outcome }}"
echo "cmd-outcome = ${{ steps.cmd.outcome }}"
echo "powershell-outcome = ${{ steps.powershell.outcome }}"
echo "pwsh-outcome = ${{ steps.pwsh.outcome }}"