github.com/nektos/act@v0.2.83/pkg/runner/testdata/windows-add-env-powershell-5/push.yml (about) 1 on: 2 push: 3 jobs: 4 test: 5 runs-on: windows-latest 6 steps: 7 - run: | 8 echo $env:GITHUB_ENV 9 echo "key=val" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append 10 echo "key2<<EOF" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append 11 echo "line1" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append 12 echo "line2" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append 13 echo "EOF" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append 14 cat $env:GITHUB_ENV 15 shell: powershell 16 - run: | 17 ls env: 18 if($env:key -ne 'val') { 19 echo "Unexpected value for `$env:key: $env:key" 20 exit 1 21 } 22 if($env:key2 -ne "line1`nline2") { 23 echo "Unexpected value for `$env:key2: $env:key2" 24 exit 1 25 } 26 shell: powershell 27 - run: | 28 echo $env:GITHUB_ENV 29 echo "KEY=test" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 30 # Defect missing append, test is broken!!! 31 echo "Key=expected" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 32 shell: powershell 33 - name: Assert GITHUB_ENV is merged case insensitive 34 run: exit 1 35 if: env.KEY != 'expected' || env.Key != 'expected' || env.key != 'expected' 36 shell: powershell 37 - name: Assert step env is merged case insensitive 38 run: exit 1 39 if: env.KEY != 'n/a' || env.Key != 'n/a' || env.key != 'n/a' 40 env: 41 KeY: 'n/a' 42 shell: powershell 43 - uses: actions/checkout@v3 44 - uses: ./windows-add-env-powershell-5/action 45 - name: Assert composite env is merged case insensitive 46 run: exit 1 47 if: env.KEY != 'n/a' || env.Key != 'n/a' || env.key != 'n/a' 48 shell: powershell