From 6b957fc61cd29887d74e43222fb45d6a6129bcb9 Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Wed, 8 Apr 2026 20:12:45 -0500 Subject: [PATCH] ci: add dev tag trigger and environment-based image tagging 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) --- .gitea/workflows/docker-build.yml | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/docker-build.yml b/.gitea/workflows/docker-build.yml index 6bfb9cc..8561567 100644 --- a/.gitea/workflows/docker-build.yml +++ b/.gitea/workflows/docker-build.yml @@ -1,11 +1,13 @@ # Gitea Actions: Docker Build, Push, and Notify # # CI/CD pipeline for Major Domo Database API: -# - Triggered by pushing a CalVer tag (e.g., 2026.4.5) -# - Builds Docker image and pushes to Docker Hub with version + latest tags +# - Triggered by pushing a CalVer tag (e.g., 2026.4.5) or the 'dev' tag +# - CalVer tags push with version + "production" Docker tags +# - "dev" tag pushes with "dev" Docker tag for the dev environment # - Sends Discord notifications on success/failure # # To release: git tag -a 2026.4.5 -m "description" && git push origin 2026.4.5 +# To test: git tag -f dev && git push -f origin dev name: Build Docker Image @@ -13,6 +15,7 @@ on: push: tags: - '20*' # matches CalVer tags like 2026.4.5 + - 'dev' jobs: build: @@ -32,6 +35,11 @@ jobs: echo "version=$VERSION" >> $GITHUB_OUTPUT echo "sha_short=$SHA_SHORT" >> $GITHUB_OUTPUT echo "timestamp=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_OUTPUT + if [ "$VERSION" = "dev" ]; then + echo "environment=dev" >> $GITHUB_OUTPUT + else + echo "environment=production" >> $GITHUB_OUTPUT + fi - name: Set up Docker Buildx uses: https://github.com/docker/setup-buildx-action@v3 @@ -49,6 +57,7 @@ jobs: push: true tags: | manticorum67/major-domo-database:${{ steps.version.outputs.version }} + manticorum67/major-domo-database:${{ steps.version.outputs.environment }} manticorum67/major-domo-database:latest cache-from: type=registry,ref=manticorum67/major-domo-database:buildcache cache-to: type=registry,ref=manticorum67/major-domo-database:buildcache,mode=max @@ -61,6 +70,7 @@ jobs: echo "" >> $GITHUB_STEP_SUMMARY echo "**Image Tags:**" >> $GITHUB_STEP_SUMMARY echo "- \`manticorum67/major-domo-database:${{ steps.version.outputs.version }}\`" >> $GITHUB_STEP_SUMMARY + echo "- \`manticorum67/major-domo-database:${{ steps.version.outputs.environment }}\`" >> $GITHUB_STEP_SUMMARY echo "- \`manticorum67/major-domo-database:latest\`" >> $GITHUB_STEP_SUMMARY echo "" >> $GITHUB_STEP_SUMMARY echo "**Build Details:**" >> $GITHUB_STEP_SUMMARY