-
Notifications
You must be signed in to change notification settings - Fork 2
128 lines (113 loc) · 3.7 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: test pruner
on:
push:
paths:
- 'experimental/**'
- '.github/**'
workflow_dispatch:
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
permissions:
contents: read
jobs:
build_and_prune:
runs-on: "ubuntu-latest"
services:
registry:
image: registry:2
ports:
- 5000:5000
env:
REGISTRY_STORAGE: "s3"
REGISTRY_STORAGE_S3_BUCKET: "s3mock"
REGISTRY_STORAGE_S3_V4AUTH: "false"
REGISTRY_STORAGE_S3_REGION: "generic"
REGISTRY_STORAGE_S3_REGIONENDPOINT: "http://s3mock:9090"
REGISTRY_STORAGE_S3_SECURE: "false"
REGISTRY_STORAGE_S3_ACCESSKEY: "123"
REGISTRY_STORAGE_S3_SECRETKEY: "123"
REGISTRY_STORAGE_REDIRECT_DISABLE: "true"
credentials:
username: oxpa
password: ${{ secrets.DOCKERHUB_PASS }}
s3mock:
image: adobe/s3mock
ports:
- 9090:9090
env:
initialBuckets: testme
credentials:
username: oxpa
password: ${{ secrets.DOCKERHUB_PASS }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Login to Dockerhub
uses: docker/login-action@v3
with:
username: oxpa
password: ${{ secrets.DOCKERHUB_PASS }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64v8, amd64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: network=host
- name: Build A as latest image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "A"
- name: Build B as latest image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "B"
- name: Build AB as latest image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest,localhost:5000/image:AB"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "AB"
- name: Build A as latest and A
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:A,localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "A"
- name: Build AB for latest
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56
env:
SOURCE_DATE_EPOCH: 123
with:
file: "Dockerfile"
context: "examples/fixtures/"
platforms: "amd64,arm64"
tags: "localhost:5000/image:latest"
outputs: type=registry,push=true,rewrite-timestamp=true
target: "AB"