From 9ca3432f8e8260aadeb823fc756458b6b67a614b Mon Sep 17 00:00:00 2001 From: Sam Catlow Date: Tue, 10 Nov 2026 10:57:06 +0000 Subject: [PATCH] ci(canary): take archied from the published edge image canary and promote compiled archied from source on every run, the canary every fifteen minutes. Both now copy the binary out of archied:edge, which deploy already published for main. The canary keeps its checkout: a rollback diffs the migrations between two release tags. Promotion never reads the repository, so it drops its own. --- .github/workflows/canary.yml | 20 +++++++++++--------- .github/workflows/promote.yml | 25 +++++++++++-------------- 2 files changed, 22 insertions(+), 23 deletions(-) diff --git a/.github/workflows/canary.yml b/.github/workflows/canary.yml index abb1fbdfe..948bfaf70 100644 --- a/.github/workflows/canary.yml +++ b/.github/workflows/canary.yml @@ -23,18 +23,20 @@ jobs: ref: main fetch-depth: 0 - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: false - - - name: Build archied - run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied - - name: Log in to the Gitea registry run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin + - name: Fetch the published archied + # The deploy workflow already built this binary. edge is the newest + # main that passed the gate. + run: | + set -e + image=git.catlow.cloud/sam/archied:edge + docker pull -q "$image" + container="$(docker create "$image")" + docker cp "$container:/usr/local/bin/archied" "$RUNNER_TEMP/archied" + docker rm "$container" >/dev/null + - name: Judge the canary env: ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }} diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml index 336dda3de..8d848fda4 100644 --- a/.github/workflows/promote.yml +++ b/.github/workflows/promote.yml @@ -21,23 +21,20 @@ jobs: if: vars.CANARY_URL != '' runs-on: self-hosted steps: - - name: Checkout - uses: actions/checkout@v4 - with: - ref: main - - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version-file: go.mod - cache: false - - - name: Build archied - run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied - - name: Log in to the Gitea registry run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin + - name: Fetch the published archied + # The deploy workflow already built this binary. edge is the newest + # main that passed the gate. + run: | + set -e + image=git.catlow.cloud/sam/archied:edge + docker pull -q "$image" + container="$(docker create "$image")" + docker cp "$container:/usr/local/bin/archied" "$RUNNER_TEMP/archied" + docker rm "$container" >/dev/null + - name: Promote the canary's release env: ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}