diff --git a/.gitea/workflows/docker.yaml b/.gitea/workflows/docker.yaml index 97228ca..c99ff44 100644 --- a/.gitea/workflows/docker.yaml +++ b/.gitea/workflows/docker.yaml @@ -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 }} diff --git a/README.md b/README.md index 4e6526e..eb3d2d5 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ Every build is tagged `:latest`, plus one tag based on the ref: | Ref | Tag | Pushed | |---|---|---| -| `master` | `:` | yes | +| `master`, `main` | `:` | yes | | `develop`, `feature/*` | branch with `/` → `-` | yes | | git tag | `:` | yes | | pull request | `:pr-` | yes |