feat(docker): treat main like master

Push to main now tags :main and pushes, like master. main is matched
exactly so branches such as maintenance/* are not affected.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
UltimateCoderandClaude Opus 5.5 committed 2026-10-15 22:48:12 +02:00
1 parent 5f12fca301
commit 08bf02f98c
2 files changed
+4 -3

No files matched your search

+3 -2
View File
@@ -54,8 +54,9 @@ jobs:
--file "${{ inputs.DockerFilePath }}" \
--build-arg VERSION=${{ inputs.DockerImageVersion }}
# main is matched exactly, so branches like maintenance/* don't count as main.
- name: Docker Release - Master
if: startsWith(github.ref, 'refs/heads/master')
if: startsWith(github.ref, 'refs/heads/master') || github.ref == 'refs/heads/main'
run: |
docker image tag "$IMAGE:latest" "$IMAGE:${GITHUB_REF_NAME}"
@@ -78,7 +79,7 @@ jobs:
docker image tag "$IMAGE:latest" "$IMAGE:pr-${PR_NUM}"
- name: Docker Push
if: startsWith(github.ref, 'refs/heads/master') || startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/feature/') || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/')
if: startsWith(github.ref, 'refs/heads/master') || github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/develop') || startsWith(github.ref, 'refs/heads/feature/') || startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/pull/')
env:
USERNAME: ${{ secrets.DockerUsername }}
PASSWORD: ${{ secrets.DockerPassword }}
+1 -1
View File
@@ -37,7 +37,7 @@ Every build is tagged `:latest`, plus one tag based on the ref:
| Ref | Tag | Pushed |
|---|---|---|
| `master` | `:<branch>` | yes |
| `master`, `main` | `:<branch>` | yes |
| `develop`, `feature/*` | branch with `/` → `-` | yes |
| git tag | `:<tag>` | yes |
| pull request | `:pr-<number>` | yes |