Skip to content

Commit 6951317

Browse files
authored
Merge pull request #5 from sysprog21/fix/push_image_only_on_push
Add conditions for pushing images from GithubCI to DockerHub
2 parents 70c0785 + 7cc8aae commit 6951317

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/docker.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ jobs:
2020
uses: docker/setup-buildx-action@v3
2121
- name: Login to Docker Hub
2222
uses: docker/login-action@v3
23+
if: github.event_name == 'push'
2324
with:
2425
username: ${{ secrets.DOCKERHUB_USERNAME }}
2526
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
@@ -28,5 +29,5 @@ jobs:
2829
with:
2930
context: .
3031
platforms: linux/amd64,linux/arm64
31-
push: true
32-
tags: sysprog21/chisel-bootcamp:latest
32+
push: ${{ github.event_name == 'push' }}
33+
tags: sysprog21/chisel-bootcamp:latest

0 commit comments

Comments
 (0)