ci: switch to tag-based Docker builds #129
No reviewers
Labels
No Label
ai-changes-requested
ai-failed
ai-merged
ai-pr-opened
ai-reviewed
ai-reviewing
ai-reviewing
ai-working
bug
enhancement
evolution
performance
phase-0
phase-1a
phase-1b
phase-1c
phase-1d
security
tech-debt
todo
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: cal/paper-dynasty-database#129
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "ci/tag-based-docker-builds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Adopts the Major Domo "build on tag" CI pattern. Docker images are now built only when a CalVer tag is pushed — no more builds on PRs or branch pushes.
Changes
push.tags: ['20*']only (removes branch push + PR triggers)calver,docker-tags,gitea-tagreusable actions)<version>+production(removes dev/rc/stable channel logic)next-releaserelease workflow, updated CI/CD descriptionHow to release
What's removed
next-releasebranch triggersAI Code Review
Files Reviewed
.gitea/workflows/build.yml(modified)CLAUDE.md(modified)Findings
Correctness
push.tags: ['20*']correctly matches CalVer tags like2026.3.11. The20*glob will not false-positive on branch names since branch triggers have been fully removed.VERSION=${GITHUB_REF#refs/tags/}is correct bash parameter expansion. ForGITHUB_REF=refs/tags/2026.3.11, this yields2026.3.11exactly. No off-by-one or edge case.fetch-depth: 0: Retained and still necessary forgit rev-parse --short HEADin the version step.productiontag: Always overwritten on each release — correct behavior for a "latest stable" pointer.if: success()andif: failure()now fire unconditionally on tag-triggered runs (previously gated on branch name). This is the correct behavior — tag pushes are always release events.gitea-tagstep: The auto-tagging-on-merge step is correctly dropped since tags are now created manually before the workflow fires.sha_shortandtimestampoutputs: Computed in the version step and used in Build Summary and Discord notifications. Not used in Docker tags (appropriate — version tag is the canonical identifier).next-releaserelease workflow and replaces it with a single accurate line. Matches the parentCLAUDE.mdwhich already states thenext-releasestaging pattern is retired.Security
DOCKERHUB_USERNAME,DOCKERHUB_TOKEN, andDISCORD_WEBHOOKcontinue to be sourced from repository secrets.GITHUB_REFis a trusted context variable provided by the runner, not user input.Style & Conventions
type=registry— standard BuildKit pattern, was previously absent.Suggestions
Verdict: APPROVED
Clean, focused CI refactor. Trigger, version extraction, Docker tagging, and Discord notifications are all correct. CLAUDE.md update accurately reflects the new workflow and removes the stale
next-releasedocumentation that the parent CLAUDE.md already marked as retired. No correctness issues, no security concerns, no convention violations.Automated review by Claude PR Reviewer
AI Code Review
Files Reviewed
.gitea/workflows/build.yml(modified)CLAUDE.md(modified)Findings
Correctness
'20*'correctly matches CalVer tags like2026.3.11and2026.3.42.VERSION=${GITHUB_REF#refs/tags/}is the standard shell prefix-stripping pattern for tag refs — produces the bare tag value as expected.SHA_SHORTviagit rev-parse --short HEADandtimestampviadate -uare both correct inline replacements for the removedcalverreusable action outputs.<version>+production) correctly replace the old multi-channel (stable/rc/dev) logic. Theproductionfloating tag gives operators a stable pull target.cache-from/cache-tovia registry,mode=max) is correct buildx syntax and was genuinely missing before.if: success()andif: failure()are now unconditional — this is correct because the workflow only runs on tag pushes, so the old branch-name guards were redundant noise.Tag releasestep (which usedcal/gitea-actions/gitea-tag@mainto create a git tag on merge) is correctly removed — the tag now exists as the trigger, so creating one inside the job would be a no-op or conflict.next-releaserelease flow is removed, replaced with the two-command release recipe. This aligns with the parent CLAUDE.md note that "next-releasestaging pattern is retired."Security
DOCKERHUB_USERNAME,DOCKERHUB_TOKEN, andDISCORD_WEBHOOKcontinue to be consumed from repository secrets — unchanged.buildcachetag is pushed to the same Docker Hub repo. No new attack surface; standard registry-backed cache pattern.Style & Conventions
fetch-depth: 0retained (comment explaining it removed, but the value is kept — acceptable since the full history is still useful forgit rev-parsecorrectness on shallow clones).Suggestions
fetch-depth: 0comment removal is minor, but if someone wonders why full history is needed here (it isn't strictly required forrev-parse --short HEAD), a note would be self-documenting. Non-blocking.buildcacheis a shared mutable tag. If two tags are pushed in rapid succession, the second build's cache push will race with the first. This is benign (worst case: slightly suboptimal cache hit) but worth being aware of.Verdict: APPROVED
Clean, focused CI refactor. The implementation exactly matches what the PR body describes — tag-based trigger, inline version extraction, simplified tags, build cache added, stale multi-channel logic removed. No correctness issues, no security regressions. CLAUDE.md update is accurate and consistent with the parent repo's "next-release is retired" convention.
Automated review by Claude PR Reviewer
AI Code Review
Files Reviewed
.gitea/workflows/build.yml(modified)CLAUDE.md(modified)Findings
Correctness
${GITHUB_REF#refs/tags/}is the standard shell parameter expansion for stripping therefs/tags/prefix from the Gitea/GitHub ref. Produces the bare CalVer string (e.g.,2026.3.11).fetch-depth: 0is retained — correct, needed sogit rev-parse --short HEADresolves against the full history rather than a shallow clone.versionstep is positioned beforeSet up Docker BuildxandLogin to Docker Hubin the new workflow. This reordering is safe — extraction is pure shell, has no Docker dependencies, and the outputs are not consumed until theBuild and pushstep.<version>andproduction) are well-formed;productionserves as the stable pull target for deployments without needing to know the exact version.cache-from/cache-towithmode=max) is correct and was genuinely missing before.Security
DOCKERHUB_USERNAME,DOCKERHUB_TOKEN, andDISCORD_WEBHOOKcontinue to be referenced via${{ secrets.* }}— no change here.'20*'is deliberately broad. Any tag starting with20triggers a build and push. This is acceptable for a single-owner repo but worth noting: a mis-pushed tag like2000-oopswould trigger a real Docker Hub push. A tighter pattern like'20[0-9][0-9].[0-9]*'would be marginally more defensive, but this is a non-blocking style preference.Style & Conventions
build.ymlcomment block at the top (lines 1–8) is updated to match the new trigger model — accurate and consistent with the existing commenting style.To release:note in the comment block is a nice addition for discoverability.next-releaserelease workflow (which the parentCLAUDE.mdalready retired) with the two-line tag-push command — accurate and concise.YYYY.M.BUILDformat in the CLAUDE.md release line uses.M.(single-digit month) while CalVer tags in the PR body and comments useYYYY.M.BUILD. This is self-consistent within the PR and matches the tag pattern20*.Suggestions
'production'tag is overwritten on every release. If the deployment pull command isdocker pull manticorum67/paper-dynasty-database:production, operators don't need to know the version tag — convenient. If they ever need to roll back, they'd need to pull by version tag explicitly. This is a workflow decision, not a bug.mode=maxcache is appropriate for a single-runner setup.mode=maxcaches all intermediate layers (more cache hits, more storage). For a low-frequency release workflow this is fine.Verdict: APPROVED
Clean, focused CI simplification. The tag extraction, Docker build/push, and CLAUDE.md update are all correct. The new workflow is simpler, easier to reason about, and eliminates the multi-channel complexity that was no longer needed after
next-releasewas retired. No correctness issues, no security regressions, no convention violations.Automated review by Claude PR Reviewer
Reviewed by pd-ops (Claude). Changes are correct and match the Major Domo tag-based CI pattern.
push.tags: ['20*']only — removes branch/PR build noise${GITHUB_REF#refs/tags/}is clean and removes dependency on calver/docker-tags/gitea-tag reusable actions<version>+productionare correctApproved to merge.
Reviewed and approved by pd-ops (Claude). Tag-based CI conversion is correct — matches Major Domo pattern, removes calver/docker-tags/gitea-tag reusable actions, adds build cache, updates CLAUDE.md.