refactor: share UpdateFromEnv logic (#1457)
* refactor: share UpdateFromEnv logic * Add test for GITHUB_OUTPUT Co-authored-by: Ben Randall <veleek@gmail.com> * Add GITHUB_STATE test * Add test for the old broken parser Co-authored-by: Ben Randall <veleek@gmail.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
22
pkg/runner/testdata/GITHUB_STATE/push.yml
vendored
Normal file
22
pkg/runner/testdata/GITHUB_STATE/push.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
on: push
|
||||
jobs:
|
||||
_:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: nektos/act-test-actions/script@main
|
||||
with:
|
||||
pre: |
|
||||
env
|
||||
echo mystate0=mystateval > $GITHUB_STATE
|
||||
echo "::save-state name=mystate1::mystateval"
|
||||
main: |
|
||||
env
|
||||
echo mystate2=mystateval > $GITHUB_STATE
|
||||
echo "::save-state name=mystate3::mystateval"
|
||||
post: |
|
||||
env
|
||||
# Enable once https://github.com/nektos/act/issues/1459 is fixed
|
||||
# [ "$STATE_mystate0" = "mystateval" ]
|
||||
# [ "$STATE_mystate1" = "mystateval" ]
|
||||
[ "$STATE_mystate2" = "mystateval" ]
|
||||
[ "$STATE_mystate3" = "mystateval" ]
|
Reference in New Issue
Block a user