File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change 99env :
1010 REGISTRY : ghcr.io
1111 IMAGE_NAME : ${{ github.repository }}
12+ BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
1213
1314jobs :
1415 test :
5758
5859 - name : Make tag
5960 run : |
60- [ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
61+ [ "${GITHUB_EVENT_NAME}" == 'push' && "${BRANCH_NAME}" == 'main' ] && echo "tag=latest" >> $GITHUB_ENV || true
62+ [ "${GITHUB_EVENT_NAME}" == 'pull_request' || "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
6163 [ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true
62- [ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true
6364
6465 - name : Build and push image
6566 uses : docker/build-push-action@v6
You can’t perform that action at this time.
0 commit comments