Skip to content

Commit 170641d

Browse files
committed
ci: only push to docker hub when a release was created
1 parent 4064d35 commit 170641d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
- "main"
88

99
jobs:
10-
docker:
10+
release:
1111
runs-on: ubuntu-latest
1212
if: ${{ !contains(github.event.head_commit.message, 'chore(release)') }}
1313
permissions:
@@ -47,6 +47,7 @@ jobs:
4747
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4848

4949
- name: Build and push
50+
if: steps.semanticrelease.outputs.new-release-published == 'true'
5051
uses: docker/build-push-action@v5
5152
with:
5253
push: true
@@ -55,6 +56,7 @@ jobs:
5556
${{ secrets.DOCKERHUB_REPO }}/${{ secrets.DOCKERHUB_IMG }}:latest
5657
5758
- name: Docker Hub Description
59+
if: steps.semanticrelease.outputs.new-release-published == 'true'
5860
uses: peter-evans/dockerhub-description@v3
5961
with:
6062
username: ${{ secrets.DOCKERHUB_USERNAME }}

0 commit comments

Comments
 (0)