[auto commit] update context (workflow=auto dump context, event=pull_… #665
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: matrix secret | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| env: | |
| FRUIT: APPLES | |
| jobs: | |
| dereference: | |
| strategy: | |
| matrix: | |
| org: [apples, bananas, carrots] #Array of org mnemonics to use below | |
| include: | |
| # includes a new variable for each org (this is effectively a switch statement) | |
| - org: apples | |
| secret: APPLES | |
| - org: bananas | |
| secret: BANANAS | |
| - org: carrots | |
| secret: CARROTS | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 3 | |
| steps: | |
| - run: echo "org:${{ matrix.org }} secret:${SECRET}" | |
| env: | |
| SECRET: ${{ secrets[matrix.secret] }} # zizmor: ignore[overprovisioned-secrets] | |
| - run: echo "env:${FRUIT} secret:${SECRET}" | |
| env: | |
| SECRET: ${{ secrets.APPLES }} # explicit secret reference avoids overprovisioned secrets |