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.
This commit is contained in:
1 parent
1b53c5787e
commit
9ca3432f8e
2 files changed
+22
-23
No files matched your search
@@ -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 }}
|
||||
|
||||
@@ -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 }}
|
||||
|
||||
Reference in new issue
Block a user