Skip to content

Commit

Permalink
ci: only push to docker hub when a release was created
Browse files Browse the repository at this point in the history
  • Loading branch information
TimPietrusky committed Dec 8, 2023
1 parent 4064d35 commit 170641d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
- "main"

jobs:
docker:
release:
runs-on: ubuntu-latest
if: ${{ !contains(github.event.head_commit.message, 'chore(release)') }}
permissions:
Expand Down Expand Up @@ -47,6 +47,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
if: steps.semanticrelease.outputs.new-release-published == 'true'
uses: docker/build-push-action@v5
with:
push: true
Expand All @@ -55,6 +56,7 @@ jobs:
${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}:latest
- name: Docker Hub Description
if: steps.semanticrelease.outputs.new-release-published == 'true'
uses: peter-evans/dockerhub-description@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down

0 comments on commit 170641d

Please sign in to comment.