deps: bump the minor-and-patch group across 3 directories with 1 upda… #623
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: Extract Snippets | |
| on: | |
| push: | |
| branches: [main] | |
| # No paths filter on pull_request — required status checks need this workflow to | |
| # always trigger and report `validate`. The validate job is cheap (~20s) and | |
| # idempotent: it just re-runs aggregate + extract + drift-check, which is a | |
| # no-op for PRs that don't touch samples/scripts. | |
| pull_request: | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| working-directory: scripts | |
| run: yarn install --immutable | |
| - name: Aggregate manifests | |
| working-directory: scripts | |
| run: yarn aggregate | |
| - name: Extract snippets | |
| working-directory: scripts | |
| run: yarn extract | |
| - name: Validate structure | |
| working-directory: scripts | |
| run: yarn validate | |
| - name: Verify no drift (PR only) | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| git diff --exit-code snippets.json snippet-manifest.yaml || \ | |
| (echo "::error::Extracted artifacts are out of date. Run 'cd scripts && yarn all' and commit the results." && exit 1) | |
| commit: | |
| needs: validate | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: "22" | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - name: Install dependencies | |
| working-directory: scripts | |
| run: yarn install --immutable | |
| - name: Aggregate manifests | |
| working-directory: scripts | |
| run: yarn aggregate | |
| - name: Extract snippets | |
| working-directory: scripts | |
| run: yarn extract | |
| - name: Check for changes | |
| id: diff | |
| run: | | |
| git diff --quiet snippets.json snippet-manifest.yaml || echo "changed=true" >> "$GITHUB_OUTPUT" | |
| - name: Commit updated artifacts | |
| if: steps.diff.outputs.changed == 'true' | |
| run: | | |
| git config user.name "github-actions[bot]" | |
| git config user.email "github-actions[bot]@users.noreply.github.com" | |
| git add snippets.json snippet-manifest.yaml | |
| git commit -m "chore: update extracted snippets and manifest" | |
| git push | |
| - name: Notify ciam-core of snippet changes | |
| run: | | |
| gh api repos/SecureAuthCorp/ciam-core/dispatches \ | |
| -f event_type=quickstart-snippets-updated \ | |
| -f 'client_payload[sha]=${{ github.sha }}' | |
| env: | |
| GH_TOKEN: ${{ secrets.GH_SERVICE_ACCOUNT_DEVOPS_2_PAT1 }} |