Skip to content

GHA Matrix Examples

GHA Matrix Examples #5

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:
matrix:
type_b: [type_b_00, type_b_01, type_b_02]
steps:
-
name: Print type_b
run: |
if [[ "${{ matrix.type_b }}" == "type_b_01" ]]; then
echo "FAIL: key:${{ matrix.type_b }}" >> $GITHUB_STEP_SUMMARY
else
echo "Summary: key:${{ matrix.type_b }}" >> $GITHUB_STEP_SUMMARY
fi