mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: environment handling windows (host mode) (#1732)
* fix: environment handling windows (host mode) * fixup * fixup * add more tests * fixup * fix setenv * fixes * [skip ci] Apply suggestions from code review Co-authored-by: Jason Song <i@wolfogre.com> * Update side effects --------- Co-authored-by: Jason Song <i@wolfogre.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
1a239d7ab7
commit
b6ccb2fa98
12 changed files with 107 additions and 17 deletions
7
act/runner/testdata/windows-add-env/action.yml
vendored
Normal file
7
act/runner/testdata/windows-add-env/action.yml
vendored
Normal file
|
@ -0,0 +1,7 @@
|
|||
runs:
|
||||
using: composite
|
||||
steps:
|
||||
- run: |
|
||||
echo $env:GITHUB_ENV
|
||||
echo "kEy=n/a" > $env:GITHUB_ENV
|
||||
shell: pwsh
|
17
act/runner/testdata/windows-add-env/push.yml
vendored
17
act/runner/testdata/windows-add-env/push.yml
vendored
|
@ -25,3 +25,20 @@ jobs:
|
|||
echo "Unexpected value for `$env:key2: $env:key2"
|
||||
exit 1
|
||||
}
|
||||
- run: |
|
||||
echo $env:GITHUB_ENV
|
||||
echo "KEY=test" > $env:GITHUB_ENV
|
||||
echo "Key=expected" > $env:GITHUB_ENV
|
||||
- name: Assert GITHUB_ENV is merged case insensitive
|
||||
run: exit 1
|
||||
if: env.KEY != 'expected' || env.Key != 'expected' || env.key != 'expected'
|
||||
- name: Assert step env is merged case insensitive
|
||||
run: exit 1
|
||||
if: env.KEY != 'n/a' || env.Key != 'n/a' || env.key != 'n/a'
|
||||
env:
|
||||
KeY: 'n/a'
|
||||
- uses: actions/checkout@v3
|
||||
- uses: ./windows-add-env
|
||||
- name: Assert composite env is merged case insensitive
|
||||
run: exit 1
|
||||
if: env.KEY != 'n/a' || env.Key != 'n/a' || env.key != 'n/a'
|
Loading…
Add table
Add a link
Reference in a new issue