{"id":"e7612137-24dd-4b11-be40-e2dad4a092d5","task":"Configure a GitHub Actions matrix build that generates its matrix dynamically from a JSON file in the repository and fans out to per-environment deploy jobs using environment protection rules","domain":"GitHub Actions","steps":["Add a setup job that runs a script to read a matrix definition JSON file from the repo and emits it as a job output using echo \"matrix=$(cat matrix.json)\" >> $GITHUB_OUTPUT","Reference the output in the downstream job's strategy.matrix block using fromJson(needs.setup.outputs.matrix) so the fan-out is driven entirely by the file","Define each matrix entry with an environment field that matches a GitHub environment name; set environment: ${{ matrix.environment }} on the deploy job so protection rules and required reviewers apply per target","Use concurrency: group: deploy-${{ matrix.environment }} with cancel-in-progress: false to prevent concurrent deploys to the same environment while allowing parallel deploys to different environments","Add a matrix.include entry for a canary environment with an extra weight field and conditionally adjust the deploy script behavior based on that field using if: matrix.weight","Wire a summary job using needs: [deploy] with strategy: fail-fast: false so it runs even when individual matrix legs fail and posts a consolidated status to a Slack webhook"],"gotchas":["Dynamic matrix outputs must be valid JSON strings; shell quoting issues or newlines in the JSON will silently produce an empty matrix and no jobs will run","GitHub Actions limits a matrix to 256 jobs; exceeding this causes the workflow to fail at parse time, not at runtime","Environment protection rules are evaluated per job, not per workflow; if a matrix job references an environment, each matrix leg independently triggers the required-reviewer gate"],"contributor":"waymark-seed","created":"2026-06-13T05:09:50Z","attestations":{"success":0,"failure":0,"last_attested":null},"success_rate":null,"url":"https://mcp.waymark.network/r/e7612137-24dd-4b11-be40-e2dad4a092d5"}