1
1
---
2
2
name : Alpine Mainline
3
3
on :
4
+ pull_request :
4
5
schedule :
5
6
- cron : " 0 0 * * 1"
6
7
workflow_dispatch :
@@ -46,31 +47,36 @@ jobs:
46
47
uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
47
48
48
49
- name : Configure AWS credentials
50
+ if : ${{ github.event_name != 'pull_request' }}
49
51
uses : aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
50
52
with :
51
53
aws-region : ${{ secrets.AWS_REGION }}
52
54
aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
53
55
aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
54
56
55
57
- name : Login to Amazon ECR Public Gallery
58
+ if : ${{ github.event_name != 'pull_request' }}
56
59
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
57
60
with :
58
61
registry : public.ecr.aws
59
62
60
63
- name : Login to Docker Hub
64
+ if : ${{ github.event_name != 'pull_request' }}
61
65
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
62
66
with :
63
67
username : ${{ secrets.DOCKERHUB_USERNAME }}
64
68
password : ${{ secrets.DOCKERHUB_TOKEN }}
65
69
66
70
- name : Login to GitHub Container Registry
71
+ if : ${{ github.event_name != 'pull_request' }}
67
72
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
68
73
with :
69
74
registry : ghcr.io
70
75
username : ${{ github.actor }}
71
76
password : ${{ secrets.GITHUB_TOKEN }}
72
77
73
78
- name : Login to Quay
79
+ if : ${{ github.event_name != 'pull_request' }}
74
80
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
75
81
with :
76
82
registry : quay.io
82
88
uses : docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
83
89
with :
84
90
images : |
85
- public.ecr.aws/nginx/nginx-unprivileged
86
91
docker.io/nginxinc/nginx-unprivileged
87
92
ghcr.io/nginxinc/nginx-unprivileged
93
+ public.ecr.aws/nginx/nginx-unprivileged
88
94
quay.io/nginx/nginx-unprivileged
89
95
tags : |
90
96
type=raw,value=${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-slim
@@ -106,11 +112,12 @@ jobs:
106
112
context : " {{ defaultContext }}:mainline/alpine-slim"
107
113
tags : ${{ steps.meta.outputs.tags }}
108
114
labels : ${{ steps.meta.outputs.labels }}
109
- push : true
115
+ push : ${{ github.event_name != 'pull_request' }}
110
116
# cache-from: type=gha,scope=alpine-slim
111
117
# cache-to: type=gha,mode=min,scope=alpine-slim
112
118
113
119
- name : Sign Docker Hub Manifest
120
+ if : ${{ github.event_name != 'pull_request' }}
114
121
run : |
115
122
set -ex
116
123
sudo apt update
@@ -155,31 +162,36 @@ jobs:
155
162
uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
156
163
157
164
- name : Configure AWS credentials
165
+ if : ${{ github.event_name != 'pull_request' }}
158
166
uses : aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
159
167
with :
160
168
aws-region : ${{ secrets.AWS_REGION }}
161
169
aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
162
170
aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
163
171
164
172
- name : Login to Amazon ECR Public Gallery
173
+ if : ${{ github.event_name != 'pull_request' }}
165
174
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
166
175
with :
167
176
registry : public.ecr.aws
168
177
169
178
- name : Login to Docker Hub
179
+ if : ${{ github.event_name != 'pull_request' }}
170
180
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
171
181
with :
172
182
username : ${{ secrets.DOCKERHUB_USERNAME }}
173
183
password : ${{ secrets.DOCKERHUB_TOKEN }}
174
184
175
185
- name : Login to GitHub Container Registry
186
+ if : ${{ github.event_name != 'pull_request' }}
176
187
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
177
188
with :
178
189
registry : ghcr.io
179
190
username : ${{ github.actor }}
180
191
password : ${{ secrets.GITHUB_TOKEN }}
181
192
182
193
- name : Login to Quay
194
+ if : ${{ github.event_name != 'pull_request' }}
183
195
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
184
196
with :
185
197
registry : quay.io
@@ -191,9 +203,9 @@ jobs:
191
203
uses : docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
192
204
with :
193
205
images : |
194
- public.ecr.aws/nginx/nginx-unprivileged
195
206
docker.io/nginxinc/nginx-unprivileged
196
207
ghcr.io/nginxinc/nginx-unprivileged
208
+ public.ecr.aws/nginx/nginx-unprivileged
197
209
quay.io/nginx/nginx-unprivileged
198
210
tags : |
199
211
type=raw,value=${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine
@@ -215,11 +227,12 @@ jobs:
215
227
context : " {{ defaultContext }}:mainline/alpine"
216
228
tags : ${{ steps.meta.outputs.tags }}
217
229
labels : ${{ steps.meta.outputs.labels }}
218
- push : true
230
+ push : ${{ github.event_name != 'pull_request' }}
219
231
# cache-from: type=gha,scope=debian-perl
220
232
# cache-to: type=gha,mode=min,scope=debian-perl
221
233
222
234
- name : Sign Docker Hub Manifest
235
+ if : ${{ github.event_name != 'pull_request' }}
223
236
run : |
224
237
set -ex
225
238
sudo apt update
@@ -264,31 +277,36 @@ jobs:
264
277
uses : docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0
265
278
266
279
- name : Configure AWS credentials
280
+ if : ${{ github.event_name != 'pull_request' }}
267
281
uses : aws-actions/configure-aws-credentials@010d0da01d0b5a38af31e9c3470dbfdabdecca3a # v4.0.1
268
282
with :
269
283
aws-region : ${{ secrets.AWS_REGION }}
270
284
aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
271
285
aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
272
286
273
287
- name : Login to Amazon ECR Public Gallery
288
+ if : ${{ github.event_name != 'pull_request' }}
274
289
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
275
290
with :
276
291
registry : public.ecr.aws
277
292
278
293
- name : Login to Docker Hub
294
+ if : ${{ github.event_name != 'pull_request' }}
279
295
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
280
296
with :
281
297
username : ${{ secrets.DOCKERHUB_USERNAME }}
282
298
password : ${{ secrets.DOCKERHUB_TOKEN }}
283
299
284
300
- name : Login to GitHub Container Registry
301
+ if : ${{ github.event_name != 'pull_request' }}
285
302
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
286
303
with :
287
304
registry : ghcr.io
288
305
username : ${{ github.actor }}
289
306
password : ${{ secrets.GITHUB_TOKEN }}
290
307
291
308
- name : Login to Quay
309
+ if : ${{ github.event_name != 'pull_request' }}
292
310
uses : docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
293
311
with :
294
312
registry : quay.io
@@ -300,9 +318,9 @@ jobs:
300
318
uses : docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5.5.1
301
319
with :
302
320
images : |
303
- public.ecr.aws/nginx/nginx-unprivileged
304
321
docker.io/nginxinc/nginx-unprivileged
305
322
ghcr.io/nginxinc/nginx-unprivileged
323
+ public.ecr.aws/nginx/nginx-unprivileged
306
324
quay.io/nginx/nginx-unprivileged
307
325
tags : |
308
326
type=raw,value=${{ needs.version.outputs.major }}.${{ needs.version.outputs.minor }}.${{ needs.version.outputs.patch }}-alpine-perl
@@ -324,11 +342,12 @@ jobs:
324
342
context : " {{ defaultContext }}:mainline/alpine-perl"
325
343
tags : ${{ steps.meta.outputs.tags }}
326
344
labels : ${{ steps.meta.outputs.labels }}
327
- push : true
345
+ push : ${{ github.event_name != 'pull_request' }}
328
346
# cache-from: type=gha,scope=alpine-perl
329
347
# cache-to: type=gha,mode=min,scope=alpine-perl
330
348
331
349
- name : Sign Docker Hub Manifest
350
+ if : ${{ github.event_name != 'pull_request' }}
332
351
run : |
333
352
set -ex
334
353
sudo apt update
@@ -358,6 +377,7 @@ jobs:
358
377
359
378
cleanup :
360
379
name : Delete untagged Alpine NGINX mainline Docker images on the Amazon ECR Public Gallery
380
+ if : ${{ github.event_name != 'pull_request' }}
361
381
runs-on : ubuntu-22.04
362
382
strategy :
363
383
fail-fast : false
0 commit comments