Merge pull request 'ci: add dev tag trigger and environment-based image tagging' (#114) from ci/dev-tag-support into main
Some checks failed
Build Docker Image / build (push) Failing after 1m25s

This commit is contained in:
cal 2026-04-09 04:47:41 +00:00
commit d8a020fe55

View File

@ -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