Skip to content

Commit 94f6c6a

Browse files
committed
Only push images when not triggered via a PR
1 parent 644f094 commit 94f6c6a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/docker-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
create:
55
tags:
66
- 'v*'
7+
pull_request:
8+
branches:
9+
- master
710

811
env:
912
REGISTRY_IMAGE: gocddev/gocd-dev-build
@@ -76,6 +79,7 @@ jobs:
7679
retention-days: 1
7780

7881
linux-push:
82+
if: ${{ github.event_name != 'pull_request' }}
7983
name: linux-push-${{ matrix.distro }}
8084
runs-on: ubuntu-latest
8185
needs:
@@ -160,3 +164,4 @@ jobs:
160164
registry: docker.io
161165
username: ${{ secrets.DOCKERHUB_USERNAME }}
162166
password: ${{ secrets.DOCKERHUB_TOKEN }}
167+
pushImage: ${{ github.event_name != 'pull_request' }}

0 commit comments

Comments
 (0)