Skip to content

Commit 9ea1860

Browse files
committed
run on PR for dependabot
1 parent 4f88d48 commit 9ea1860

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/main.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build all images
33
on:
44
push:
55
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
68

79
defaults:
810
run:
@@ -52,6 +54,7 @@ jobs:
5254
5355
- name: Login to GHCR
5456
uses: docker/login-action@v3
57+
if: github.event_name != 'pull_request'
5558
with:
5659
registry: ghcr.io
5760
username: ${{ github.actor }}
@@ -72,16 +75,18 @@ jobs:
7275
platforms: linux/${{ matrix.arch.name }}
7376
labels: ${{ steps.meta.outputs.labels }}
7477
tags: ${{ steps.meta.outputs.tags }}
75-
outputs: "type=image,name=ghcr.io/${{ env.BUILDBOX_IMAGE_NAME }},push-by-digest=false,name-canonical=true,push=true"
78+
outputs: "type=image,name=ghcr.io/${{ env.BUILDBOX_IMAGE_NAME }},push-by-digest=false,name-canonical=true,push=${{ github.event_name == 'pull_request' && 'false' || 'true' }}"
7679

7780
- name: Export digest
81+
if: github.event_name != 'pull_request'
7882
run: |
7983
mkdir -p /tmp/digests
8084
digest="${{ steps.build.outputs.digest }}"
8185
touch "/tmp/digests/${digest#sha256:}"
8286
8387
- name: Upload digest
8488
uses: actions/upload-artifact@v4
89+
if: github.event_name != 'pull_request'
8590
with:
8691
name: digests-buildbox-${{ env.PLATFORM_PAIR }}
8792
path: /tmp/digests/*
@@ -127,6 +132,7 @@ jobs:
127132
128133
- name: Login to GHCR
129134
uses: docker/login-action@v3
135+
if: github.event_name != 'pull_request'
130136
with:
131137
registry: ghcr.io
132138
username: ${{ github.actor }}
@@ -147,16 +153,18 @@ jobs:
147153
platforms: linux/${{ matrix.arch.name }}
148154
labels: ${{ steps.meta.outputs.labels }}
149155
tags: ${{ steps.meta.outputs.tags }}
150-
outputs: "type=image,name=ghcr.io/${{ env.TESTBOX_IMAGE_NAME }},push-by-digest=false,name-canonical=true,push=true"
156+
outputs: "type=image,name=ghcr.io/${{ env.TESTBOX_IMAGE_NAME }},push-by-digest=false,name-canonical=true,push=${{ github.event_name == 'pull_request' && 'false' || 'true' }}"
151157

152158
- name: Export digest
159+
if: github.event_name != 'pull_request'
153160
run: |
154161
mkdir -p /tmp/digests
155162
digest="${{ steps.build.outputs.digest }}"
156163
touch "/tmp/digests/${digest#sha256:}"
157164
158165
- name: Upload digest
159166
uses: actions/upload-artifact@v4
167+
if: github.event_name != 'pull_request'
160168
with:
161169
name: digests-${{ matrix.distro }}-${{ env.PLATFORM_PAIR }}
162170
path: /tmp/digests/*

0 commit comments

Comments
 (0)