Add more steps context support (#887)
* feat: add more steps context support - Add step outcome - Remove step success in favour of conclusion * feat: add conclusion and outcome steps context tests Add corresponding tests and extend pkg/runner/expression.go vmSteps() to handle steps context conclusion and outcome iota as strings. Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
14
pkg/runner/testdata/steps-context/conclusion/push.yml
vendored
Normal file
14
pkg/runner/testdata/steps-context/conclusion/push.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: conclusion
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: first
|
||||
run: exit 0
|
||||
- id: second
|
||||
continue-on-error: true
|
||||
run: exit 1
|
||||
- run: echo '${{ steps.first.conclusion }}' | grep 'success'
|
||||
- run: echo '${{ steps.second.conclusion }}' | grep 'success'
|
14
pkg/runner/testdata/steps-context/outcome/push.yml
vendored
Normal file
14
pkg/runner/testdata/steps-context/outcome/push.yml
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
name: outcome
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
check:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- id: first
|
||||
run: exit 0
|
||||
- id: second
|
||||
continue-on-error: true
|
||||
run: exit 1
|
||||
- run: echo '${{ steps.first.outcome }}' | grep 'success'
|
||||
- run: echo '${{ steps.second.outcome }}' | grep 'failure'
|
Reference in New Issue
Block a user