feat(releaseupdate): publish to next and promote to stable only after a canary evaluation (#1716)
Quality / check (push) Successful in 3m49s
deploy / gate (push) Failing after 16m14s
deploy / archied-image (push) Skipped
deploy / agent-image (push) Skipped
deploy / dist-zip (push) Skipped

This commit is contained in:
sam committed 2026-10-31 21:39:32 +11:00
1 parent a7f6e517ad
commit a4a7c96da6
11 files changed
+1106 -119

No files matched your search

+47
View File
@@ -0,0 +1,47 @@
# Judges the release on next against the canary every quarter hour: a hard
# failure rolls the canary back at once, and a release that passes a full
# window is promoted to stable. A rollback turns the run red.
name: canary
on:
schedule:
- cron: "*/15 * * * *"
workflow_dispatch:
concurrency:
group: canary
permissions:
contents: read
packages: write
jobs:
judge:
if: vars.CANARY_URL != ''
runs-on: self-hosted
steps:
# Full history with tags: a rollback compares the migrations between
# the stable and failed release tags.
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build archied
run: go build -o "$RUNNER_TEMP/archied" ./cmd/archied
# Promotion retags stable in the registry.
- name: Log in to the Gitea registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
- name: Judge the canary
env:
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
run: |
"$RUNNER_TEMP/archied" release canary check -dashboard "${{ vars.CANARY_URL }}"
+10 -2
View File
@@ -353,8 +353,8 @@ jobs:
# Installs and updates take a release from the signed artifact in the
# registry, so this is what publishes it: the statement signed with
# RELEASE_SIGNING_KEY and the zip, tagged v<version>, next, and stable
# unless it is a prerelease.
# RELEASE_SIGNING_KEY and the zip, tagged v<version> and next. stable
# moves only when canary.yml promotes it.
- name: Log in to the Gitea registry
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
@@ -402,6 +402,14 @@ jobs:
"$api/repos/$repo/releases" >/dev/null
echo "published release notes for $tag"
# The canary follows next; canary.yml judges the release on it and
# promotes it to stable or rolls the canary back.
- name: Install the release on the canary
if: vars.CANARY_URL != ''
env:
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
run: ./dist/archied release canary start -dashboard "${{ vars.CANARY_URL }}" -version "${{ steps.version.outputs.version }}"
# A Gitea package belongs to its owner, not a repository, so the ones this
# workflow publishes are linked here. Linking is per package and a no-op
# once done, so an already linked package is not an error.