Files
vercel__workflow/.github/workflows/dispatch-front-workflow-release-pr.yml
Nathan Rajlich 3621f8d058 [backport] [ci] Stop using Release App token + bump pnpm/action-setup (#1918)
* ci: upgrade pnpm/action-setup to v5 and read version from package.json (#1785)

* ci: upgrade pnpm/action-setup to v6 and read version from package.json

Removes hardcoded pnpm version (10.14.0) from all workflows and instead
reads the version from the packageManager field in package.json, so CI
stays in sync with the version used locally.

* ci: update setup-workflow-dev composite action to use pnpm/action-setup@v6

Also removes the pnpm-version input since the action now reads the
version from package.json#packageManager.

* ci: downgrade pnpm/action-setup to v5

v6 installs pnpm 11 RC/beta, which has a regression
(pnpm/pnpm#11264, pnpm/action-setup#225/#227/#228) that causes
'ERR_PNPM_BROKEN_LOCKFILE: expected a single document in the stream'
when the project's packageManager pins a 10.x pnpm version. v5 is the
latest stable release before v6 and supports reading the version from
package.json#packageManager.

* ci: stop using Release App token in release workflows (#1866)

The Release App has been temporarily removed. Switch the Release and
Backport workflows to use the default GITHUB_TOKEN, and disable the
cross-repo Front dispatch workflow until the App is restored.

Also add a workflow_dispatch trigger to release.yml so the Version
Packages PR can be created/updated manually (since pushes made by
GITHUB_TOKEN do not trigger downstream workflow runs).

* ci: use GitHub API commit mode for changesets action (#1867)

The repo enforces "Commits must have verified signatures" via an
org/enterprise-level ruleset, which blocks unsigned commits pushed via
the Git CLI by GITHUB_TOKEN. Switching the changesets action to
commitMode: github-api makes commits GPG-signed by GitHub.

* Add changeset for backport

* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Nathan Rajlich <n@n8.io>

---------

Signed-off-by: Nathan Rajlich <n@n8.io>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
2026-05-04 14:26:23 -07:00

110 lines
3.9 KiB
YAML

name: Dispatch Front Workflow Release PR
# DISABLED: This workflow dispatches to vercel/front (cross-repo) which
# requires a GitHub App token. The Release App has been temporarily
# removed, so this workflow is disabled (all jobs gated on `if: false`)
# until the App is restored. See .github/workflows/release.yml, which
# has also been updated to no longer rely on the Release App.
on:
pull_request:
types: [opened, synchronize, reopened, closed]
concurrency:
group: dispatch-front-workflow-release-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
permissions:
contents: read
jobs:
dispatch-front-sync:
name: Dispatch Front Sync
if: >
false &&
startsWith(github.event.pull_request.head.ref, 'changeset-release/') &&
github.event.action != 'closed'
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
owner: vercel
repositories: workflow,front
- name: Checkout workflow repo
uses: actions/checkout@v4
- name: Read workflow version
id: version
run: |
VERSION=$(node -e "const fs=require('fs'); const p=JSON.parse(fs.readFileSync('packages/workflow/package.json','utf8')); process.stdout.write(p.version)")
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
- name: Wait for docs deployment
id: waitForDocsDeployment
uses: ./.github/actions/wait-for-vercel-project
with:
team-id: "team_nLlpyC6REAqxydlFKbrMDlud"
project-id: "prj_aLMkVj1S4Alk08AThC76nXgwbLEB"
vercel-token: ${{ secrets.VERCEL_DOCS_TOKEN }}
timeout: 1200
check-interval: 15
environment: preview
- name: Dispatch front workflow (sync)
uses: actions/github-script@v7
env:
MODE: sync
FRONT_REPO: vercel/front
FRONT_WORKFLOW_ID: workflow-sync-workflow-release-pr.yml
SOURCE_REPO: ${{ github.repository }}
SOURCE_PR_NUMBER: ${{ github.event.pull_request.number }}
SOURCE_PR_URL: ${{ github.event.pull_request.html_url }}
WORKFLOW_VERSION: ${{ steps.version.outputs.version }}
DOCS_DEPLOYMENT_URL: ${{ steps.waitForDocsDeployment.outputs.deployment-url }}
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const trigger = require('./scripts/trigger-front-release-workflow-dispatch.cjs');
await trigger({ github, context });
dispatch-front-close:
name: Dispatch Front Close
if: >
false &&
startsWith(github.event.pull_request.head.ref, 'changeset-release/') &&
github.event.action == 'closed'
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.RELEASE_APP_ID }}
private-key: ${{ secrets.RELEASE_APP_PRIVATE_KEY }}
owner: vercel
repositories: workflow,front
- name: Checkout workflow repo
uses: actions/checkout@v4
- name: Dispatch front workflow (close)
uses: actions/github-script@v7
env:
MODE: close
FRONT_REPO: vercel/front
FRONT_WORKFLOW_ID: workflow-sync-workflow-release-pr.yml
SOURCE_REPO: ${{ github.repository }}
SOURCE_PR_NUMBER: ${{ github.event.pull_request.number }}
SOURCE_PR_URL: ${{ github.event.pull_request.html_url }}
WORKFLOW_VERSION: ""
DOCS_DEPLOYMENT_URL: ""
with:
github-token: ${{ steps.app-token.outputs.token }}
script: |
const trigger = require('./scripts/trigger-front-release-workflow-dispatch.cjs');
await trigger({ github, context });