name: "C3 - Generate changesets for dependabot PRs" on: pull_request_target: # zizmor: ignore[dangerous-triggers] dependabot-only job requires write access to push generated changesets; checkout v6 persists credentials under RUNNER_TEMP paths: - "packages/create-cloudflare/src/frameworks/package.json" permissions: # content:write permission needed to update add changesets to dependabot PRs # (see tools/dependabot/generate-dependabot-pr-changesets.ts) contents: write jobs: generate-changeset: runs-on: ubuntu-slim if: | github.event.pull_request.user.login == 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository steps: - name: Checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 with: fetch-depth: 2 persist-credentials: true ref: ${{ github.head_ref }} token: ${{ secrets.GH_ACCESS_TOKEN }} - name: Install Dependencies uses: ./.github/actions/install-dependencies - name: Configure Git run: | git config --global user.email wrangler@cloudflare.com git config --global user.name 'Wrangler automated PR updater' - name: Generate C3 changesets # Keep the final param (the changeset prefix: `c3-frameworks-update`) in sync with the filter in the `.github/workflows/c3-e2e-dependabot.yml` workflow. run: node -r esbuild-register tools/dependabot/generate-dependabot-pr-changesets.ts "$PR_NUMBER" create-cloudflare packages/create-cloudflare/src/frameworks/package.json c3-frameworks-update env: PR_NUMBER: ${{ github.event.number }}