Skip to content

chore: production deploy #3775

chore: production deploy

chore: production deploy #3775

name: Dispatch cli-e2e-ci
# Triggers supabase/cli-e2e-ci to run the cli `test:live` suite against a full Supabox stack
# built from this PR's head commit — distinct from live-e2e.yml, which targets managed staging.
# Opt in with the `run-live-e2e-ci` label; fork PRs cannot dispatch (no access to the App
# secret) and use cli-e2e-ci's own workflow_dispatch with `cli_ref` instead.
on:
pull_request:
types: [labeled, synchronize, reopened]
permissions:
contents: read
jobs:
dispatch:
# Fork PRs don't receive secrets (GH_APP_PRIVATE_KEY), so the App-token step would fail; skip them.
if: >-
contains(github.event.pull_request.labels.*.name, 'run-live-e2e-ci')
&& github.event.pull_request.head.repo.full_name == github.repository
runs-on: ubuntu-latest
steps:
# App token scoped to cli-e2e-ci with contents:write — the
# repository_dispatch REST endpoint requires write on the target repo.
- name: Create GitHub App token
id: app-token
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
with:
client-id: ${{ vars.GH_APP_CLIENT_ID }}
private-key: ${{ secrets.GH_APP_PRIVATE_KEY }}
owner: supabase
repositories: cli-e2e-ci
permission-contents: write
- name: Dispatch live run to cli-e2e-ci
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
CLI_SHA: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
echo "Dispatching cli-e2e-ci live run for PR #${PR_NUMBER} @ ${CLI_SHA}"
# Build the nested client_payload with jq — `gh api -f` sends a flat
# body and would not nest `client_payload.*` correctly.
jq -n --arg sha "$CLI_SHA" --argjson pr "$PR_NUMBER" \
'{event_type: "cli-pr", client_payload: {cli_sha: $sha, pr_number: $pr}}' \
| gh api -X POST repos/supabase/cli-e2e-ci/dispatches --input -