feat(world-postgres): event-first start-hook admission #6941
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: 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 and | |
| # .github/workflows/backport.yml, which have 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: vercel/wait-for-deployment-action@0e2b0c5c5cce31f1648108aeec56467187aca037 | |
| with: | |
| project-slug: workflow-docs | |
| # The job-level `permissions: contents: read` blocks the default | |
| # GITHUB_TOKEN from reading the Deployments / Statuses APIs. | |
| # Use the GitHub App token, which already has the necessary scopes | |
| # for the workflow,front repositories. | |
| github-token: ${{ steps.app-token.outputs.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 }); |