Skip to content

deps: bump the minor-and-patch group across 3 directories with 4 upda… #719

deps: bump the minor-and-patch group across 3 directories with 4 upda…

deps: bump the minor-and-patch group across 3 directories with 4 upda… #719

Workflow file for this run

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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # 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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # 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 }}