We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fd7db62 commit 6863f31Copy full SHA for 6863f31
.github/workflows/docker.yaml
@@ -57,9 +57,8 @@ jobs:
57
58
- name: Make tag
59
run: |
60
- [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
61
- [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true
62
- [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true
+ [ "${BRANCH_NAME}" == 'main' ] && echo "tag=latest" >> $GITHUB_ENV || true
+ [ "${BRANCH_NAME}" != 'main' ] && echo "tag=${BRANCH_NAME}" >> $GITHUB_ENV || true
63
64
- name: Build and push image
65
uses: docker/build-push-action@v6
0 commit comments