Skip to content

Commit 6863f31

Browse files
committed
image tag name
1 parent fd7db62 commit 6863f31

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

.github/workflows/docker.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,8 @@ jobs:
5757

5858
- name: Make tag
5959
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
60+
[ "${BRANCH_NAME}" == 'main' ] && echo "tag=latest" >> $GITHUB_ENV || true
61+
[ "${BRANCH_NAME}" != 'main' ] && echo "tag=${BRANCH_NAME}" >> $GITHUB_ENV || true
6362
6463
- name: Build and push image
6564
uses: docker/build-push-action@v6

0 commit comments

Comments
 (0)