Skip to content

Commit 84e801d

Browse files
committed
push latest tag
1 parent d8be3fd commit 84e801d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

.github/workflows/docker-build.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: Docker Build
22

33
on:
4-
push:
5-
tags:
6-
- v*
4+
release:
5+
types: [published]
76

87
env:
98
IMAGE_NAME: bot
@@ -26,11 +25,11 @@ jobs:
2625
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
2726
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
2827
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
29-
[ "$VERSION" == "master" ] && VERSION=latest
3028
echo IMAGE_ID=$IMAGE_ID
3129
echo VERSION=$VERSION
3230
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
33-
docker push $IMAGE_ID:$VERSION
31+
docker tag $IMAGE_NAME $IMAGE_ID:latest
32+
docker push --all-tags $IMAGE_ID
3433
3534
deploy:
3635
needs: build

0 commit comments

Comments
 (0)