ci: drop comments from workflow files
This commit is contained in:
5 files changed
-103
No files matched your search
@@ -1,9 +1,3 @@
|
|||||||
# Every 15 minutes, checks how the release installed on the canary host is
|
|
||||||
# running, judged over the window counted from its install (-window, default
|
|
||||||
# 24h; CANARY_WINDOW overrides it). If a hard check fails, the canary goes
|
|
||||||
# back to the stable release straight away. If the release stays healthy for
|
|
||||||
# the window, it's promoted to stable. A rollback fails the run, so it shows
|
|
||||||
# up red.
|
|
||||||
name: canary
|
name: canary
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -23,8 +17,6 @@ jobs:
|
|||||||
if: vars.CANARY_URL != ''
|
if: vars.CANARY_URL != ''
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
# Full history with tags: a rollback compares the migrations between
|
|
||||||
# the stable and failed release tags.
|
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -35,15 +27,11 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
|
||||||
# archiving them for the Actions cache takes minutes.
|
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Build archied
|
- name: Build archied
|
||||||
# The check never serves the dashboard, so the build leaves it out.
|
|
||||||
run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied
|
run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied
|
||||||
|
|
||||||
# Promotion retags stable and the images' latest in the registry.
|
|
||||||
- name: Log in to the Gitea registry
|
- name: Log in to the Gitea registry
|
||||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
# Builds and pushes the archied and archie-agent images to the Gitea
|
|
||||||
# registry on every merge to main, and publishes the distribution zip as a
|
|
||||||
# release on this repository. Gitea Actions reads this .github/workflows/
|
|
||||||
# directory.
|
|
||||||
name: deploy
|
name: deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -9,18 +5,6 @@ on:
|
|||||||
branches: [main]
|
branches: [main]
|
||||||
tags: ["v*"]
|
tags: ["v*"]
|
||||||
|
|
||||||
# Rapid successive pushes to main (a release commit right after its
|
|
||||||
# preceding fix, say) previously queued a full gate+build for each one,
|
|
||||||
# several minutes apiece, with no caching -- so a burst of pushes left
|
|
||||||
# three deploys racing in parallel for the same runner capacity. Only the
|
|
||||||
# last one's images matter (each job pushes its image tags), so cancel a
|
|
||||||
# superseded run rather than let it fight for resources it can't use.
|
|
||||||
#
|
|
||||||
# Keyed on the commit, not github.ref: a release push lands main and its
|
|
||||||
# tag in one go, both pointing at the same commit -- on.push matches
|
|
||||||
# branches and tags both, so a single release push otherwise fires
|
|
||||||
# redundant builds of identical content that a ref-keyed group can't see
|
|
||||||
# as the same work.
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: deploy-${{ github.sha }}
|
group: deploy-${{ github.sha }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -40,10 +24,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Read the release from the commit, not from github.ref. One release
|
|
||||||
# push carries main and both tags at the same SHA, and only one of
|
|
||||||
# those refs survives the concurrency group, so a ref-derived version
|
|
||||||
# is whatever won the race. The tag at HEAD is the same either way.
|
|
||||||
- name: Resolve archied tag at HEAD
|
- name: Resolve archied tag at HEAD
|
||||||
id: release_tag
|
id: release_tag
|
||||||
run: |
|
run: |
|
||||||
@@ -59,8 +39,6 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
|
||||||
# archiving them for the Actions cache takes minutes.
|
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
@@ -87,22 +65,12 @@ jobs:
|
|||||||
git branch main origin/main
|
git branch main origin/main
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
|
|
||||||
# A self-hosted runner should not need sudo, and installing a package on
|
|
||||||
# every run is not the gate's job.
|
|
||||||
- name: Verify unprivileged user namespaces
|
- name: Verify unprivileged user namespaces
|
||||||
run: unshare --user --map-root-user --net true
|
run: unshare --user --map-root-user --net true
|
||||||
|
|
||||||
# The gate's uncached `go test ./...` runs the Docker-backed tests that
|
|
||||||
# -short skips, and those start a container from alpine:3. A fresh runner
|
|
||||||
# has no such image, so the suite failed on "No such image: alpine:3".
|
|
||||||
- name: Pull test container images
|
- name: Pull test container images
|
||||||
run: docker pull alpine:3
|
run: docker pull alpine:3
|
||||||
|
|
||||||
# One definition of the gate, in the Taskfile. TEST_FLAGS is the one
|
|
||||||
# difference: the release runs the whole suite, uncached and including
|
|
||||||
# the Docker-backed tests -short skips. The diff after it asserts
|
|
||||||
# `task fmt` changed nothing.
|
|
||||||
- name: Quality gate
|
- name: Quality gate
|
||||||
run: |
|
run: |
|
||||||
task check TEST_FLAGS=-count=1
|
task check TEST_FLAGS=-count=1
|
||||||
@@ -148,9 +116,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Deliberately NOT `github.sha`. On a tag push that is the ref's OBJECT id,
|
|
||||||
# and every release tag in this repo is annotated, so it names a tag object
|
|
||||||
# that cannot be checked out. Dereference it to the commit.
|
|
||||||
- name: Resolve the commit this ref points at
|
- name: Resolve the commit this ref points at
|
||||||
id: commit
|
id: commit
|
||||||
run: |
|
run: |
|
||||||
@@ -214,7 +179,6 @@ jobs:
|
|||||||
cache-from: type=gha,scope=archied
|
cache-from: type=gha,scope=archied
|
||||||
cache-to: type=gha,mode=max,scope=archied
|
cache-to: type=gha,mode=max,scope=archied
|
||||||
|
|
||||||
|
|
||||||
agent-image:
|
agent-image:
|
||||||
outputs:
|
outputs:
|
||||||
agent_digest: ${{ steps.agent.outputs.digest }}
|
agent_digest: ${{ steps.agent.outputs.digest }}
|
||||||
@@ -226,7 +190,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# Annotated tags: dereference to the commit, as archied-image does.
|
|
||||||
- name: Resolve the commit this ref points at
|
- name: Resolve the commit this ref points at
|
||||||
id: commit
|
id: commit
|
||||||
run: |
|
run: |
|
||||||
@@ -264,22 +227,8 @@ jobs:
|
|||||||
cache-from: type=gha,scope=archie-agent
|
cache-from: type=gha,scope=archie-agent
|
||||||
cache-to: type=gha,mode=max,scope=archie-agent
|
cache-to: type=gha,mode=max,scope=archie-agent
|
||||||
|
|
||||||
# Packages every host-run binary (archied, archie-gateway,
|
|
||||||
# archie-state-store, archie-ui, archie-messaging) as a
|
|
||||||
# linux/amd64 zip for a
|
|
||||||
# non-Docker install, plus archie-agent: it has no unit, but a Kit run
|
|
||||||
# mounts it from archied's directory, so a host without it parks them.
|
|
||||||
# It waits only for the agent image, whose digest
|
|
||||||
# release.json pins.
|
|
||||||
dist-zip:
|
dist-zip:
|
||||||
needs: [gate, agent-image]
|
needs: [gate, agent-image]
|
||||||
# Not gated on github.ref. A release is pushed as main plus both tags at
|
|
||||||
# one SHA, the concurrency group below collapses those into a single run,
|
|
||||||
# and the survivor is whichever ref happened to start last -- for
|
|
||||||
# v1.23.0 that was refs/heads/main, so this job was skipped and no zip
|
|
||||||
# was ever produced. Resolve the tag from the commit instead of trusting
|
|
||||||
# the ref that won the race, and skip only when there is genuinely no
|
|
||||||
# archied tag at HEAD.
|
|
||||||
if: needs.gate.outputs.archied_version != ''
|
if: needs.gate.outputs.archied_version != ''
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
@@ -290,8 +239,6 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
|
||||||
# archiving them for the Actions cache takes minutes.
|
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- uses: pnpm/action-setup@v4
|
- uses: pnpm/action-setup@v4
|
||||||
@@ -303,7 +250,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
node-version: "24"
|
node-version: "24"
|
||||||
|
|
||||||
# archied and archie-ui embed the dashboard.
|
|
||||||
- name: Build the dashboard
|
- name: Build the dashboard
|
||||||
working-directory: ui
|
working-directory: ui
|
||||||
run: |
|
run: |
|
||||||
@@ -367,10 +313,6 @@ jobs:
|
|||||||
path: ${{ steps.zip.outputs.name }}.zip
|
path: ${{ steps.zip.outputs.name }}.zip
|
||||||
retention-days: 90
|
retention-days: 90
|
||||||
|
|
||||||
# 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> and next. stable
|
|
||||||
# moves only when canary.yml promotes it.
|
|
||||||
- name: Log in to the Gitea registry
|
- name: Log in to the Gitea registry
|
||||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
@@ -388,8 +330,6 @@ jobs:
|
|||||||
-agent-image "git.catlow.cloud/sam/archie-agent@${{ needs.agent-image.outputs.agent_digest }}" \
|
-agent-image "git.catlow.cloud/sam/archie-agent@${{ needs.agent-image.outputs.agent_digest }}" \
|
||||||
-changelog "https://git.catlow.cloud/sam/archie/releases/tag/v$version"
|
-changelog "https://git.catlow.cloud/sam/archie/releases/tag/v$version"
|
||||||
|
|
||||||
# The release page carries this version's changelog section, the
|
|
||||||
# release's own reviewed prose; the signed statement links to it.
|
|
||||||
- name: Publish the Gitea release notes
|
- name: Publish the Gitea release notes
|
||||||
env:
|
env:
|
||||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
@@ -418,21 +358,12 @@ jobs:
|
|||||||
"$api/repos/$repo/releases" >/dev/null
|
"$api/repos/$repo/releases" >/dev/null
|
||||||
echo "published release notes for $tag"
|
echo "published release notes for $tag"
|
||||||
|
|
||||||
# The canary host follows the `next` channel. canary.yml then judges the
|
|
||||||
# release installed on the canary and decides whether it is promoted to
|
|
||||||
# stable or the canary is rolled back. The start is queue-safe: a release
|
|
||||||
# published while the canary still judges a newer one is queued behind
|
|
||||||
# it and picked up by the next check, so the running window isn't
|
|
||||||
# restarted under a different release.
|
|
||||||
- name: Install the release on the canary
|
- name: Install the release on the canary
|
||||||
if: vars.CANARY_URL != ''
|
if: vars.CANARY_URL != ''
|
||||||
env:
|
env:
|
||||||
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
|
ARCHIE_CANARY_TOKEN: ${{ secrets.CANARY_TOKEN }}
|
||||||
run: ./dist/archied release canary start -dashboard "${{ vars.CANARY_URL }}" -version "${{ steps.version.outputs.version }}"
|
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.
|
|
||||||
- name: Link the packages to this repository
|
- name: Link the packages to this repository
|
||||||
env:
|
env:
|
||||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
# Promotes the release the canary is running right now, without waiting out
|
|
||||||
# the judging window: the canary's signals must show no hard failure and no
|
|
||||||
# relative breach, otherwise the run refuses and fails. Dispatch it with the
|
|
||||||
# version the canary runs (`archied release canary status` shows it).
|
|
||||||
name: promote
|
name: promote
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -34,15 +30,11 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
|
||||||
# archiving them for the Actions cache takes minutes.
|
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Build archied
|
- name: Build archied
|
||||||
# The promote never serves the dashboard, so the build leaves it out.
|
|
||||||
run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied
|
run: go build -tags no_ui -o "$RUNNER_TEMP/archied" ./cmd/archied
|
||||||
|
|
||||||
# Promotion retags stable and the images' latest in the registry.
|
|
||||||
- name: Log in to the Gitea registry
|
- name: Log in to the Gitea registry
|
||||||
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
run: echo "${{ secrets.DEPLOY_TOKEN }}" | docker login git.catlow.cloud -u "${{ github.actor }}" --password-stdin
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
name: Quality
|
name: Quality
|
||||||
|
|
||||||
# Pull requests only: a push to main runs deploy.yml's gate, the full suite.
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
@@ -19,9 +18,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
# ripgrep and the unprivileged-userns sysctl are provisioned on the host.
|
|
||||||
# A self-hosted runner should not need sudo, and installing a package on
|
|
||||||
# every run is not the gate's job.
|
|
||||||
- name: Verify unprivileged user namespaces
|
- name: Verify unprivileged user namespaces
|
||||||
run: unshare --user --map-root-user --net true
|
run: unshare --user --map-root-user --net true
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,3 @@
|
|||||||
# Cuts a release from main: [Unreleased] in CHANGELOG.md becomes the version's
|
|
||||||
# section, then the commit and its tag are pushed together. The tag push starts
|
|
||||||
# deploy.yml, which publishes the release to `next` for the canary.
|
|
||||||
name: release
|
name: release
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -21,8 +18,6 @@ jobs:
|
|||||||
cut:
|
cut:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
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
|
- name: Check DEPLOY_TOKEN is configured
|
||||||
env:
|
env:
|
||||||
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
DEPLOY_TOKEN: ${{ secrets.DEPLOY_TOKEN }}
|
||||||
@@ -32,8 +27,6 @@ jobs:
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
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
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -45,8 +38,6 @@ jobs:
|
|||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version-file: go.mod
|
go-version-file: go.mod
|
||||||
# The self-hosted runner keeps the Go caches on disk between jobs, and
|
|
||||||
# archiving them for the Actions cache takes minutes.
|
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
- name: Install Task
|
- name: Install Task
|
||||||
@@ -60,6 +51,5 @@ jobs:
|
|||||||
git config user.email "sam@catlow.tech"
|
git config user.email "sam@catlow.tech"
|
||||||
task release RELEASE="$RELEASE"
|
task release RELEASE="$RELEASE"
|
||||||
|
|
||||||
# Atomic: a commit without its tag would build images stamped dev.
|
|
||||||
- name: Push the release
|
- name: Push the release
|
||||||
run: git push --atomic origin main "$(git describe --exact-match --match 'v*' HEAD)"
|
run: git push --atomic origin main "$(git describe --exact-match --match 'v*' HEAD)"
|
||||||
Reference in new issue
Block a user