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:
1 parent
5f12fca301
commit
08bf02f98c
2 files changed
+4
-3
No files matched your search
@@ -54,8 +54,9 @@ jobs:
|
|||||||
--file "${{ inputs.DockerFilePath }}" \
|
--file "${{ inputs.DockerFilePath }}" \
|
||||||
--build-arg VERSION=${{ inputs.DockerImageVersion }}
|
--build-arg VERSION=${{ inputs.DockerImageVersion }}
|
||||||
|
|
||||||
|
# main is matched exactly, so branches like maintenance/* don't count as main.
|
||||||
- name: Docker Release - Master
|
- name: Docker Release - Master
|
||||||
if: startsWith(github.ref, 'refs/heads/master')
|
if: startsWith(github.ref, 'refs/heads/master') || github.ref == 'refs/heads/main'
|
||||||
run: |
|
run: |
|
||||||
docker image tag "$IMAGE:latest" "$IMAGE:${GITHUB_REF_NAME}"
|
docker image tag "$IMAGE:latest" "$IMAGE:${GITHUB_REF_NAME}"
|
||||||
|
|
||||||
@@ -78,7 +79,7 @@ jobs:
|
|||||||
docker image tag "$IMAGE:latest" "$IMAGE:pr-${PR_NUM}"
|
docker image tag "$IMAGE:latest" "$IMAGE:pr-${PR_NUM}"
|
||||||
|
|
||||||
- name: Docker Push
|
- 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:
|
env:
|
||||||
USERNAME: ${{ secrets.DockerUsername }}
|
USERNAME: ${{ secrets.DockerUsername }}
|
||||||
PASSWORD: ${{ secrets.DockerPassword }}
|
PASSWORD: ${{ secrets.DockerPassword }}
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ Every build is tagged `:latest`, plus one tag based on the ref:
|
|||||||
|
|
||||||
| Ref | Tag | Pushed |
|
| Ref | Tag | Pushed |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| `master` | `:<branch>` | yes |
|
| `master`, `main` | `:<branch>` | yes |
|
||||||
| `develop`, `feature/*` | branch with `/` → `-` | yes |
|
| `develop`, `feature/*` | branch with `/` → `-` | yes |
|
||||||
| git tag | `:<tag>` | yes |
|
| git tag | `:<tag>` | yes |
|
||||||
| pull request | `:pr-<number>` | yes |
|
| pull request | `:pr-<number>` | yes |
|
||||||
|
|||||||
Reference in new issue
Block a user