summaryrefslogtreecommitdiffstats
path: root/pkg/runner/testdata/evalmatrixneeds/push.yml
blob: 30f52acd1e5b004eddf67e0053f0cf3017dec36a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
on: push
jobs:
  prepare:
    runs-on: ubuntu-latest
    steps:
    - run: |
        echo '::set-output name=matrix::{"package": ["a", "b"]}'
      id: r1
    outputs:
      matrix: ${{steps.r1.outputs.matrix}}
  evalm:
    needs:
    - prepare
    strategy:
      matrix: |-
        ${{fromJson(needs.prepare.outputs.matrix)}}
    runs-on: ubuntu-latest
    steps:
    - name: Check if the matrix key package exists
      run: |
        echo $MATRIX
        exit ${{matrix.package && '0' || '1'}}
      env:
        MATRIX: ${{toJSON(matrix)}}