-
Notifications
You must be signed in to change notification settings - Fork 0
138 lines (127 loc) · 3.77 KB
/
windows-latest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
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 bashrc
cat ~/.bashrc
- 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 }}"