Skip to content

GHA Matrix Examples

GHA Matrix Examples #7

Workflow file for this run

name: GHA Matrix Examples
on:
workflow_dispatch:
jobs:
test_matrix_a:
runs-on: ubuntu-latest
strategy:
matrix:
type_a: [type_a_00, type_a_01, type_a_02]
steps:
-
name: Print type_x
run: |
echo "Summary: key:${{ matrix.type_a }}" >> $GITHUB_STEP_SUMMARY
test_matrix_b:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
type_b: [type_b_00, type_b_01, type_b_02]
steps:
-
name: Step One
run: |
if [[ "${{ matrix.type_b }}" == "type_b_01" ]]; then
echo "FAIL Step One: key:${{ matrix.type_b }}" >> $GITHUB_STEP_SUMMARY
exit 1
else
echo "Step One: key:${{ matrix.type_b }}" >> $GITHUB_STEP_SUMMARY
fi
-
name: Step Two
run: |
echo "Step Two: key:${{ matrix.type_b }}" >> $GITHUB_STEP_SUMMARY