Skip to content

Commit

Permalink
Only push images when a tag is made
Browse files Browse the repository at this point in the history
  • Loading branch information
jdubois committed Nov 22, 2023
1 parent 08ee0dc commit 5e3381e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/publish-jvm-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,6 @@ jobs:
uses: docker/build-push-action@v5
with:
context: .
push: ${{ github.event_name == 'push' }}
push: ${{ startsWith(github.ref, 'refs/tags/v') }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
6 changes: 1 addition & 5 deletions .github/workflows/publish-native-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,9 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Tag the native (GraalVM) Docker image
- name: Tag the native (GraalVM) Docker image and push it
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
run: |
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_NAME }}:latest
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ env.DOCKER_IMAGE_NAME }}:${{ github.ref_name }}
- name: Push the native (GraalVM) Docker image
if: ${{ github.event_name == 'push' }}
run: |
docker push --all-tags ${{ env.DOCKER_IMAGE_NAME }}

0 comments on commit 5e3381e

Please sign in to comment.