Skip to content

Commit

Permalink
push docker image only tag v*
Browse files Browse the repository at this point in the history
  • Loading branch information
fchastanet committed Nov 25, 2021
1 parent f8ff00d commit 65d77a1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
uses: docker/setup-buildx-action@v1

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

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

0 comments on commit 65d77a1

Please sign in to comment.