mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-09-15 18:57:01 +00:00
fix: processing of strategy.matrix.include (#1200)
* Update workflow.go * Update workflow.go * Update workflow.go * Update workflow.go * Update workflow.go * Update workflow.go * Add Tests * Update workflow.go * Modify Test * use tabs Co-authored-by: Casey Lee <cplee@nektos.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
This commit is contained in:
parent
f083ea85c9
commit
0ef41579a3
3 changed files with 102 additions and 1 deletions
63
act/runner/testdata/evalmatrix/push.yml
vendored
63
act/runner/testdata/evalmatrix/push.yml
vendored
|
@ -15,4 +15,65 @@ jobs:
|
|||
echo $MATRIX
|
||||
exit ${{matrix.A && '0' || '1'}}
|
||||
env:
|
||||
MATRIX: ${{toJSON(matrix)}}
|
||||
MATRIX: ${{toJSON(matrix)}}
|
||||
_additionalInclude_0:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- def: val
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if the matrix key A exists
|
||||
run: |
|
||||
echo $MATRIX
|
||||
exit ${{matrix.def == 'val' && '0' || '1'}}
|
||||
env:
|
||||
MATRIX: ${{toJSON(matrix)}}
|
||||
- run: |
|
||||
echo "::set-output name=result::success"
|
||||
id: result
|
||||
outputs:
|
||||
result: ${{ steps.result.outputs.result }}
|
||||
_additionalInclude_1:
|
||||
needs: _additionalInclude_0
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if the matrix key A exists
|
||||
run: |
|
||||
echo $MATRIX
|
||||
exit ${{needs._additionalInclude_0.outputs.result == 'success' && '0' || '1'}}
|
||||
_additionalProperties_0:
|
||||
strategy:
|
||||
matrix:
|
||||
x:
|
||||
- 0
|
||||
y:
|
||||
- 0
|
||||
z:
|
||||
- 0
|
||||
include:
|
||||
- def: val
|
||||
z: 0
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if the matrix key A exists
|
||||
run: |
|
||||
echo $MATRIX
|
||||
exit ${{matrix.def == 'val' && matrix.x == 0 && matrix.y == 0 && matrix.z == 0 && '0' || '1'}}
|
||||
env:
|
||||
MATRIX: ${{toJSON(matrix)}}
|
||||
- run: |
|
||||
echo "::set-output name=result::success"
|
||||
id: result
|
||||
outputs:
|
||||
result: ${{ steps.result.outputs.result }}
|
||||
_additionalProperties_1:
|
||||
needs: _additionalProperties_0
|
||||
if: always()
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check if the matrix key A exists
|
||||
run: |
|
||||
echo $MATRIX
|
||||
exit ${{needs._additionalProperties_0.outputs.result == 'success' && '0' || '1'}}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue