ci: add dev tag trigger and environment-based image tagging #114

Merged
cal merged 1 commits from ci/dev-tag-support into main 2026-04-09 04:47:43 +00:00
Owner

Summary

  • Adds dev to the CI tag trigger list so pushing a dev tag builds a Docker image
  • Adds environment output (dev or production) for environment-based image tagging
  • CalVer builds now push :version + :production + :latest
  • Dev builds push :dev + :latest
  • Keeps :latest for backward compatibility with current akamai docker-compose

Test plan

  • Merge PR, then force-update the dev tag to trigger a CI build
  • Verify Docker Hub has manticorum67/major-domo-database:dev image
  • Pull and deploy on dev server (ssh sba-db)

🤖 Generated with Claude Code

## Summary - Adds `dev` to the CI tag trigger list so pushing a `dev` tag builds a Docker image - Adds `environment` output (`dev` or `production`) for environment-based image tagging - CalVer builds now push `:version` + `:production` + `:latest` - Dev builds push `:dev` + `:latest` - Keeps `:latest` for backward compatibility with current akamai docker-compose ## Test plan - [ ] Merge PR, then force-update the `dev` tag to trigger a CI build - [ ] Verify Docker Hub has `manticorum67/major-domo-database:dev` image - [ ] Pull and deploy on dev server (`ssh sba-db`) 🤖 Generated with [Claude Code](https://claude.com/claude-code)
cal added 1 commit 2026-04-09 01:13:12 +00:00
Adds support for the 'dev' tag to trigger CI builds, pushing :dev Docker
tag for the dev environment. CalVer tags now also push :production alongside
:latest for future migration.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude added the
ai-reviewing
label 2026-04-09 01:15:50 +00:00
Claude reviewed 2026-04-09 01:16:55 +00:00
Claude left a comment
Collaborator

AI Code Review

Files Reviewed

  • .gitea/workflows/docker-build.yml (modified)

Findings

Correctness

No issues found.

The environment output logic is correct: VERSION=devenvironment=dev, any CalVer tag → environment=production. The tag list correctly produces :version + :production + :latest for CalVer builds, and :dev + :dev + :latest for dev builds.

One observation: when the dev tag triggers a build, both steps.version.outputs.version and steps.version.outputs.environment resolve to "dev", so the tag list contains manticorum67/major-domo-database:dev twice. Docker Hub and build-push-action handle duplicate tags silently (no-op), so this is functionally harmless.

Security

No issues found. Secrets are correctly used for Docker Hub credentials and Discord webhook. No hardcoded credentials introduced.

Style & Conventions

No issues found. Follows existing Gitea Actions patterns.

Suggestions

  • Duplicate :dev tag (cosmetic): Since version=dev and environment=dev are identical for dev builds, the tags list has a redundant entry. If you want to keep the tags list clean, you could conditionally include the environment tag only for non-dev builds — but given Docker ignores duplicates, this is purely cosmetic.
  • :latest updated by dev builds: After this change, force-pushing the dev tag will overwrite :latest on Docker Hub. If the production server (ssh akamai) ever performs docker-compose pull while :latest points to a dev image, it would pull a dev build. The PR notes this is intentional for backward compatibility — just worth keeping in mind when the production docker-compose.prod.yml is eventually updated to use :production explicitly.

Verdict: COMMENT

Clean CI change. Logic is correct, conventions followed, no security issues. Approved — posting as COMMENT since Gitea blocks self-approval.


Automated review by Claude PR Reviewer

## AI Code Review ### Files Reviewed - `.gitea/workflows/docker-build.yml` (modified) ### Findings #### Correctness No issues found. The `environment` output logic is correct: `VERSION=dev` → `environment=dev`, any CalVer tag → `environment=production`. The tag list correctly produces `:version` + `:production` + `:latest` for CalVer builds, and `:dev` + `:dev` + `:latest` for dev builds. One observation: when the `dev` tag triggers a build, both `steps.version.outputs.version` and `steps.version.outputs.environment` resolve to `"dev"`, so the tag list contains `manticorum67/major-domo-database:dev` twice. Docker Hub and `build-push-action` handle duplicate tags silently (no-op), so this is functionally harmless. #### Security No issues found. Secrets are correctly used for Docker Hub credentials and Discord webhook. No hardcoded credentials introduced. #### Style & Conventions No issues found. Follows existing Gitea Actions patterns. #### Suggestions - **Duplicate `:dev` tag (cosmetic)**: Since `version=dev` and `environment=dev` are identical for dev builds, the tags list has a redundant entry. If you want to keep the tags list clean, you could conditionally include the `environment` tag only for non-dev builds — but given Docker ignores duplicates, this is purely cosmetic. - **`:latest` updated by dev builds**: After this change, force-pushing the `dev` tag will overwrite `:latest` on Docker Hub. If the production server (`ssh akamai`) ever performs `docker-compose pull` while `:latest` points to a dev image, it would pull a dev build. The PR notes this is intentional for backward compatibility — just worth keeping in mind when the production `docker-compose.prod.yml` is eventually updated to use `:production` explicitly. ### Verdict: COMMENT Clean CI change. Logic is correct, conventions followed, no security issues. Approved — posting as COMMENT since Gitea blocks self-approval. --- *Automated review by Claude PR Reviewer*
Claude added
ai-reviewed
and removed
ai-reviewing
labels 2026-04-09 01:17:10 +00:00
cal merged commit d8a020fe55 into main 2026-04-09 04:47:43 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/major-domo-database#114
No description provided.