@@ -3,6 +3,8 @@ name: Build all images
3
3
on :
4
4
push :
5
5
branches : [ master ]
6
+ pull_request :
7
+ branches : [ master ]
6
8
7
9
defaults :
8
10
run :
52
54
53
55
- name : Login to GHCR
54
56
uses : docker/login-action@v3
57
+ if : github.event_name != 'pull_request'
55
58
with :
56
59
registry : ghcr.io
57
60
username : ${{ github.actor }}
@@ -72,16 +75,18 @@ jobs:
72
75
platforms : linux/${{ matrix.arch.name }}
73
76
labels : ${{ steps.meta.outputs.labels }}
74
77
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' }} "
76
79
77
80
- name : Export digest
81
+ if : github.event_name != 'pull_request'
78
82
run : |
79
83
mkdir -p /tmp/digests
80
84
digest="${{ steps.build.outputs.digest }}"
81
85
touch "/tmp/digests/${digest#sha256:}"
82
86
83
87
- name : Upload digest
84
88
uses : actions/upload-artifact@v4
89
+ if : github.event_name != 'pull_request'
85
90
with :
86
91
name : digests-buildbox-${{ env.PLATFORM_PAIR }}
87
92
path : /tmp/digests/*
@@ -127,6 +132,7 @@ jobs:
127
132
128
133
- name : Login to GHCR
129
134
uses : docker/login-action@v3
135
+ if : github.event_name != 'pull_request'
130
136
with :
131
137
registry : ghcr.io
132
138
username : ${{ github.actor }}
@@ -147,16 +153,18 @@ jobs:
147
153
platforms : linux/${{ matrix.arch.name }}
148
154
labels : ${{ steps.meta.outputs.labels }}
149
155
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' }} "
151
157
152
158
- name : Export digest
159
+ if : github.event_name != 'pull_request'
153
160
run : |
154
161
mkdir -p /tmp/digests
155
162
digest="${{ steps.build.outputs.digest }}"
156
163
touch "/tmp/digests/${digest#sha256:}"
157
164
158
165
- name : Upload digest
159
166
uses : actions/upload-artifact@v4
167
+ if : github.event_name != 'pull_request'
160
168
with :
161
169
name : digests-${{ matrix.distro }}-${{ env.PLATFORM_PAIR }}
162
170
path : /tmp/digests/*
0 commit comments