Skip to content

Commit 65d77a1

Browse files
committed
push docker image only tag v*
1 parent f8ff00d commit 65d77a1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/docker.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
uses: docker/setup-buildx-action@v1
2727

2828
- name: Log in to Docker Hub
29-
if: github.event_name != 'pull_request'
29+
if: startsWith(github.ref, 'refs/tags/v')
3030
uses: docker/login-action@v1
3131
with:
3232
username: ${{ secrets.DOCKERHUB_USERNAME }}
@@ -58,7 +58,7 @@ jobs:
5858
tags: ${{ steps.meta.outputs.tags }}
5959
labels: ${{ steps.meta.outputs.labels }}
6060
# build on feature branches, push only on master branch
61-
push: ${{ github.ref == 'refs/heads/master' }}
61+
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
6262

6363
- name: Image digest
6464
run: echo ${{ steps.docker_build.outputs.digest }}

0 commit comments

Comments
 (0)