From 85b21578d877ab83d19b67722d158f54b5191773 Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Thu, 5 Nov 2026 00:33:18 +1100 Subject: [PATCH] ci(release): name the missing DEPLOY_TOKEN before checkout, and list what a mirror needs Refs #1788 --- .github/workflows/release.yml | 11 +++++++++++ RELEASING.md | 15 +++++++++++++++ 2 files changed, 26 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0577ff525..cb07d16d4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,17 @@ jobs: cut: runs-on: self-hosted steps: + # A mirror carries its own Actions secrets. An empty token checks out + # fine and fails at the push instead, which reads as a broken release. + - name: Check DEPLOY_TOKEN is configured + env: + DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }} + run: | + if [ -z "$DEPLOY_TOKEN" ]; then + echo "::error::DEPLOY_TOKEN is not set for this repository, so the release cannot push its commit and tag. Set the secret here, or dispatch the release from the Gitea primary." + exit 1 + fi + # DEPLOY_TOKEN rather than the job token: a push made with the job token # doesn't start workflows, and the tag push must start deploy.yml. - name: Checkout diff --git a/RELEASING.md b/RELEASING.md index 1bc3d9288..a9cdb920c 100644 --- a/RELEASING.md +++ b/RELEASING.md @@ -47,6 +47,21 @@ then pushes `main` and the tag atomically with `DEPLOY_TOKEN`. A push made with the job token wouldn't start other workflows, so the user token is what lets the tag start the deploy. +Every workflow that reaches the registry or the canary reads its credentials +from Actions secrets, so a mirror of this repository carries its own set: + +| Name | Kind | Used by | +|---|---|---| +| `DEPLOY_TOKEN` | secret | release, deploy, canary, promote — the registry push, the tag push, and the package links | +| `RELEASE_SIGNING_KEY` | secret | deploy — signs the release statement | +| `CANARY_TOKEN` | secret | deploy, canary, promote — the canary's dashboard API | +| `CANARY_URL` | variable | deploy, canary, promote — where that dashboard is | +| `CANARY_WINDOW` | variable | canary — the judged window; empty means the default | + +A mirror missing them fails at its first login or push; `release.yml` names the +missing `DEPLOY_TOKEN` before it checks out, so the run doesn't read as a broken +release. + After a release, pull `main` before committing on it again: CI has added the release commit.