ci: add a [deploy]-gated image channel for the production bot
CI / compile (pull_request) Successful in 11s
CI / unit (pull_request) Successful in 27s
CI / integration (pull_request) Successful in 27s
build / build (push) Successful in 30s
CI / compile (push) Successful in 8s
CI / unit (push) Successful in 27s
CI / integration (push) Successful in 27s
CI / compile (pull_request) Successful in 11s
CI / unit (pull_request) Successful in 27s
CI / integration (pull_request) Successful in 27s
build / build (push) Successful in 30s
CI / compile (push) Successful in 8s
CI / unit (push) Successful in 27s
CI / integration (push) Successful in 27s
The production bot tracks a SEPARATE image, conjurer-bot-deploy, promoted only when a commit message contains [deploy]. On such a commit the already- built conjurer-bot:<sha> is re-tagged (same bytes, no rebuild) and pushed as conjurer-bot-deploy:<sha>; the deploy repo's image-updater tracks it. The test bot + librarian keep updating on every build. Merging THIS commit is deliberately the FIRST [deploy]: it lands the promotion step AND carries the trigger, so it bootstraps conjurer-bot-deploy to this build - a clean baseline with every image at the same, current version. [deploy] Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit was merged in pull request #20.
This commit is contained in:
@@ -22,6 +22,23 @@ jobs:
|
|||||||
docker build -f docker/Dockerfile.bot -t gitea.czernobog.pl/gitea/conjurer-bot:$TAG .
|
docker build -f docker/Dockerfile.bot -t gitea.czernobog.pl/gitea/conjurer-bot:$TAG .
|
||||||
docker push gitea.czernobog.pl/gitea/conjurer-bot:$TAG
|
docker push gitea.czernobog.pl/gitea/conjurer-bot:$TAG
|
||||||
|
|
||||||
|
# DEPLOY channel: the production (deploy) bot tracks a SEPARATE image,
|
||||||
|
# conjurer-bot-deploy, which only gets a new tag when the commit message
|
||||||
|
# contains the trigger "[deploy]". So the test bot & librarian update on
|
||||||
|
# every build, but the deploy bot only on commits you explicitly promote.
|
||||||
|
# Same bytes as conjurer-bot:$TAG - just re-tagged, no rebuild.
|
||||||
|
- name: Promote bot to deploy channel (only on [deploy] in commit message)
|
||||||
|
run: |
|
||||||
|
TAG=${GITHUB_SHA::8}
|
||||||
|
MSG="$(git log -1 --pretty=%B)"
|
||||||
|
if echo "$MSG" | grep -qiF '[deploy]'; then
|
||||||
|
echo "Commit message contains [deploy] -> promoting conjurer-bot-deploy:$TAG"
|
||||||
|
docker tag gitea.czernobog.pl/gitea/conjurer-bot:$TAG gitea.czernobog.pl/gitea/conjurer-bot-deploy:$TAG
|
||||||
|
docker push gitea.czernobog.pl/gitea/conjurer-bot-deploy:$TAG
|
||||||
|
else
|
||||||
|
echo "No [deploy] trigger in commit message -> deploy bot image left unchanged"
|
||||||
|
fi
|
||||||
|
|
||||||
# Docker-owe: musician i share lekkie, radio CIĘŻKIE (opam+OCaml+liquidsoap)
|
# Docker-owe: musician i share lekkie, radio CIĘŻKIE (opam+OCaml+liquidsoap)
|
||||||
- name: Build docker-stack images (musician, share)
|
- name: Build docker-stack images (musician, share)
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
Reference in New Issue
Block a user