Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: ⚙️ Dynamic Matrix Workflow

on:
pull_request:
branches:
- main
- develop

jobs:

generate_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set_matrix.outputs.matrix_json }}

steps:
- name: 📝 Set Dynamic Matrix
id: set_matrix
run: |
DYNAMIC_MATRIX='[{"env":"test"},{"env":"uat"},{"env":"prod"}]'

echo "matrix_json=$DYNAMIC_MATRIX" >> $GITHUB_OUTPUT

run_tests:
needs: generate_matrix
runs-on: ubuntu-latest
strategy:
matrix:
include: ${{ fromJson(needs.generate_matrix.outputs.matrix) }}

steps:
- run: echo "${{ matrix.env }}"