1313 required : true
1414 type : string
1515
16- schedule :
17- - cron : ' 0 0 * * 1'
18-
1916jobs :
2017 generate-tier1 :
2118 runs-on : ubuntu-latest
@@ -58,13 +55,36 @@ jobs:
5855 tier1 :
5956 needs : generate-tier1
6057 runs-on : ${{ matrix.os }}
61- env : ${{ matrix.env }}
58+ # env: ${{ matrix.env }}
6259 strategy :
6360 fail-fast : false
6461 matrix :
6562 include : ${{ fromJson(needs.generate-tier1.outputs.matrix) }}
6663 steps : &buildsteps
6764
65+ - name : Setup env
66+ shell : bash
67+ if : runner.os != 'Windows'
68+ run : |
69+ matrix_env='${{ toJson(matrix.env) }}'
70+ echo $matrix_env | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> tmp.env
71+ while IFS= read -r line; do
72+ eval "echo \"$line\"" >> $GITHUB_ENV
73+ done < tmp.env
74+ rm tmp.env
75+
76+ - name : Setup env (Windows)
77+ if : runner.os == 'Windows'
78+ shell : pwsh
79+ run : |
80+ $matrix_env = '${{ toJson(matrix.env) }}'
81+ $envs = $matrix_env | ConvertFrom-Json
82+ foreach ($pair in $envs.PSObject.Properties) {
83+ $full_value = $pair.Value -replace '%([A-Za-z0-9_]+)%', '$env:$1'
84+ $value = $ExecutionContext.InvokeCommand.ExpandString($full_value)
85+ "$($pair.Name)=$value" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
86+ }
87+
6888 - name : Actions/Checkout
6989 uses : actions/checkout@main
7090 with :
@@ -250,7 +270,7 @@ jobs:
250270 if : ${{ success() || inputs.jobs_to_run }}
251271 needs : [generate-tier2, tier1]
252272 runs-on : ${{ matrix.os }}
253- env : ${{ matrix.env }}
273+ # env: ${{ matrix.env }}
254274 strategy :
255275 fail-fast : false
256276 matrix :
@@ -261,7 +281,7 @@ jobs:
261281 if : ${{ success() || inputs.jobs_to_run }}
262282 needs : [generate-tier3, tier2]
263283 runs-on : ${{ matrix.os }}
264- env : ${{ matrix.env }}
284+ # env: ${{ matrix.env }}
265285 strategy :
266286 fail-fast : false
267287 matrix :
0 commit comments