Skip to content

Commit 67e76ec

Browse files
committed
🐛 trigger build action on PRs but dont push
Signed-off-by: Pranav Gaikwad <[email protected]>
1 parent 29a8cfa commit 67e76ec

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/image-build.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ name: Multiple Architecture Image Build
22

33
on:
44
workflow_dispatch:
5+
pull_request:
6+
branches:
7+
- 'main'
8+
- 'release-*'
59
push:
610
branches:
711
- 'main'
@@ -15,12 +19,13 @@ concurrency:
1519

1620
jobs:
1721
image-build:
18-
uses: konveyor/release-tools/.github/workflows/build-push-images.yaml@main
22+
uses: pranavgaikwad/release-tools/.github/workflows/build-push-images.yaml@feat/makePushOptional
1923
with:
2024
registry: "quay.io/konveyor"
2125
image_name: "jdtls-server-base"
2226
containerfile: "./Dockerfile"
2327
architectures: '[ "amd64", "arm64", "ppc64le", "s390x" ]'
28+
publish: ${{ github.event_name == 'pull_request' && 'false' || 'true' }}
2429
secrets:
2530
registry_username: ${{ secrets.QUAY_PUBLISH_ROBOT }}
2631
registry_password: ${{ secrets.QUAY_PUBLISH_TOKEN }}
@@ -29,6 +34,7 @@ jobs:
2934
name: trigger java provider rebuild
3035
runs-on: ubuntu-latest
3136
needs: image-build
37+
if: github.event_name == 'push'
3238
steps:
3339
- name: Get Token
3440
id: get_workflow_token

0 commit comments

Comments
 (0)