Skip to content

Even more HMMM. Guessing this commit? #75

Even more HMMM. Guessing this commit?

Even more HMMM. Guessing this commit? #75

name: Matrix output test
on:
push:
branches: [ '🙄' ]
jobs:
run-matrix:
runs-on: ubuntu-latest
strategy:
matrix:
var: [ 'a', 'b' ]
outputs:
a: ${{ steps.output.outputs.a }}
b: ${{ steps.output.outputs.b }}
x: ${{ steps.output.outputs.x }}
foo: ${{ steps.foo.conclusion == 'success' && 'true' || '' }}
bar: ${{ steps.bar.conclusion == 'success' && 'true' || '' }}
steps:
- name: output
id: output
env:
V: ${{ matrix.var }}
run: |
echo "$V=$V" >> $GITHUB_OUTPUT
echo "x=$V" >> $GITHUB_OUTPUT
- name: foo
id: foo
if: matrix.var == 'a'
run: true
- name: bar
id: bar
if: matrix.var == 'b'
run: true
reader:
runs-on: ubuntu-latest
needs: run-matrix
steps:
- name: output
env:
A: ${{ needs.run-matrix.outputs.a }}
B: ${{ needs.run-matrix.outputs.b }}
X: ${{ needs.run-matrix.outputs.x }}
FOO: ${{ needs.run-matrix.outputs.foo }}
BAR: ${{ needs.run-matrix.outputs.bar }}
VALS: ${{ toJSON( needs.run-matrix.outputs ) }}
run: |
echo "A=$A B=$B X=$X"
echo "VALS=$VALS"
echo "FOO=$FOO BAR=$BAR"