Files
archie/.github/workflows/canary.yml
T
sam 2181b5fd08
Quality / check (push) Successful in 3m47s
deploy / gate (push) Successful in 6m29s
deploy / archied-image (push) Successful in 2m59s
deploy / agent-image (push) Successful in 10s
deploy / dist-zip (push) Skipped
ci(deploy): move the images' :latest only when a release is promoted (#1716)
2026-10-31 21:48:10 +11:00

49 lines
1.4 KiB
YAML

# 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 and the images' latest 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 }}" \
-latest git.catlow.cloud/sam/archied,git.catlow.cloud/sam/archie-agent