36
36
runs-on : ubuntu-latest
37
37
38
38
steps :
39
- - uses : actions/checkout@v3
39
+ - uses : actions/checkout@v4
40
40
41
41
- name : Run tests
42
42
run : |
52
52
runs-on : ubuntu-latest
53
53
54
54
steps :
55
- - uses : actions/checkout@v3
55
+ - uses : actions/checkout@v4
56
56
57
57
- name : Run tests
58
58
run : |
@@ -63,102 +63,54 @@ jobs:
63
63
docker build . --file Dockerfile
64
64
fi
65
65
66
- # Push daemon image to GitHub Packages .
67
- push-daemon-to-github-packages :
66
+ # Push daemon image to registry .
67
+ push-daemon :
68
68
69
69
# Ensure test job passes before pushing image.
70
70
needs : test-daemon
71
71
72
- name : Build Daemon & Push to GitHub Registry
72
+ name : Build & Push Daemon
73
73
runs-on : ubuntu-latest
74
74
permissions :
75
75
contents : read
76
76
packages : write
77
77
78
78
steps :
79
79
- name : Checkout
80
- uses : actions/checkout@v3
80
+ uses : actions/checkout@v4
81
81
82
82
- name : Set up QEMU
83
- uses : docker/setup-qemu-action@v2
83
+ uses : docker/setup-qemu-action@v3
84
84
85
85
- name : Set up Docker Buildx
86
- uses : docker/setup-buildx-action@v2
86
+ uses : docker/setup-buildx-action@v3
87
87
88
- # Login against a Docker registry except on PR
89
- # https://github.com/docker/login-action
90
- - name : Log into registry ${{ env.GITHUB_REGISTRY }}
88
+ # Login to Docker Hub except on PR
89
+ - name : Login to Docker Hub
91
90
if : github.event_name != 'pull_request'
92
- uses : docker/login-action@v2
91
+ uses : docker/login-action@v3
93
92
with :
94
- registry : ${{ env.GITHUB_REGISTRY }}
95
- username : ${{ github.actor }}
96
- password : ${{ secrets.GITHUB_TOKEN }}
97
-
98
- # Extract metadata (tags, labels) for Docker
99
- # https://github.com/docker/metadata-action
100
- - name : Extract Docker metadata
101
- id : meta
102
- uses : docker/metadata-action@v4
103
- with :
104
- images : ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME_DAEMON }}
105
- tags : |
106
- type=ref,event=branch
107
- type=semver,pattern={{version}}
108
- type=semver,pattern={{major}}
109
- type=semver,pattern={{major}}.{{minor}}
110
- type=semver,pattern={{major}}.{{minor}}.{{patch}}
111
-
112
- # Build and push Docker image with Buildx (don't push on PR)
113
- # https://github.com/docker/build-push-action
114
- - name : Build and push Docker image
115
- uses : docker/build-push-action@v4
116
- with :
117
- context : ./daemon/
118
- platforms : linux/amd64,linux/arm64,linux/arm/v7
119
- push : ${{ github.event_name != 'pull_request' }}
120
- tags : ${{ steps.meta.outputs.tags }}
121
- labels : ${{ steps.meta.outputs.labels }}
122
-
123
- # Push client image to GitHub Packages.
124
- push-client-to-github-packages :
125
-
126
- # Ensure test job passes before pushing image.
127
- needs : test-client
128
-
129
- name : Build Client & Push to GitHub Registry
130
- runs-on : ubuntu-latest
131
- permissions :
132
- contents : read
133
- packages : write
134
-
135
- steps :
136
- - name : Checkout
137
- uses : actions/checkout@v3
138
-
139
- - name : Set up QEMU
140
- uses : docker/setup-qemu-action@v2
141
-
142
- - name : Set up Docker Buildx
143
- uses : docker/setup-buildx-action@v2
93
+ registry : ${{ env.DOCKER_REGISTRY }}
94
+ username : ${{ secrets.DOCKERHUB_USERNAME }}
95
+ password : ${{ secrets.DOCKERHUB_TOKEN }}
144
96
145
- # Login against a Docker registry except on PR
146
- # https://github.com/docker/login-action
147
- - name : Log into registry ${{ env.GITHUB_REGISTRY }}
97
+ # Login to GitHub Container Registry except on PR
98
+ - name : Login to GitHub Container Registry
148
99
if : github.event_name != 'pull_request'
149
- uses : docker/login-action@v2
100
+ uses : docker/login-action@v3
150
101
with :
151
102
registry : ${{ env.GITHUB_REGISTRY }}
152
- username : ${{ github.actor }}
103
+ username : ${{ github.repository_owner }}
153
104
password : ${{ secrets.GITHUB_TOKEN }}
154
105
155
106
# Extract metadata (tags, labels) for Docker
156
- # https://github.com/docker/metadata-action
157
107
- name : Extract Docker metadata
158
108
id : meta
159
- uses : docker/metadata-action@v4
109
+ uses : docker/metadata-action@v5
160
110
with :
161
- images : ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME_CLIENT }}
111
+ images : |
112
+ ${{ env.IMAGE_NAME_DAEMON }}
113
+ ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME_DAEMON }}
162
114
tags : |
163
115
type=ref,event=branch
164
116
type=semver,pattern={{version}}
@@ -167,112 +119,63 @@ jobs:
167
119
type=semver,pattern={{major}}.{{minor}}.{{patch}}
168
120
169
121
# Build and push Docker image with Buildx (don't push on PR)
170
- # https://github.com/docker/build-push-action
171
122
- name : Build and push Docker image
172
- uses : docker/build-push-action@v4
123
+ uses : docker/build-push-action@v5
173
124
with :
174
- context : .
125
+ context : ./daemon/
175
126
platforms : linux/amd64,linux/arm64,linux/arm/v7
176
127
push : ${{ github.event_name != 'pull_request' }}
177
128
tags : ${{ steps.meta.outputs.tags }}
178
129
labels : ${{ steps.meta.outputs.labels }}
179
130
180
- # Push daemon image to Docker Hub .
181
- push-daemon-to-docker-hub :
131
+ # Push client image to registry .
132
+ push-client :
182
133
183
134
# Ensure test job passes before pushing image.
184
- needs : test-daemon
135
+ needs : test-client
185
136
186
- name : Build Daemon & Push to Docker Hub
137
+ name : Build & Push Client
187
138
runs-on : ubuntu-latest
188
139
permissions :
189
140
contents : read
190
141
packages : write
191
142
192
143
steps :
193
144
- name : Checkout
194
- uses : actions/checkout@v3
145
+ uses : actions/checkout@v4
195
146
196
147
- name : Set up QEMU
197
- uses : docker/setup-qemu-action@v2
148
+ uses : docker/setup-qemu-action@v3
198
149
199
150
- name : Set up Docker Buildx
200
- uses : docker/setup-buildx-action@v2
151
+ uses : docker/setup-buildx-action@v3
201
152
202
- # Login against a Docker registry except on PR
203
- # https://github.com/docker/login-action
204
- - name : Log into registry ${{ env.DOCKER_REGISTRY }}
153
+ # Login to Docker Hub except on PR
154
+ - name : Login to Docker Hub
205
155
if : github.event_name != 'pull_request'
206
- uses : docker/login-action@v2
156
+ uses : docker/login-action@v3
207
157
with :
208
158
registry : ${{ env.DOCKER_REGISTRY }}
209
159
username : ${{ secrets.DOCKERHUB_USERNAME }}
210
160
password : ${{ secrets.DOCKERHUB_TOKEN }}
211
161
212
- # Extract metadata (tags, labels) for Docker
213
- # https://github.com/docker/metadata-action
214
- - name : Extract Docker metadata
215
- id : meta
216
- uses : docker/metadata-action@v4
217
- with :
218
- images : ${{ env.IMAGE_NAME_DAEMON }}
219
- tags : |
220
- type=ref,event=branch
221
- type=semver,pattern={{version}}
222
- type=semver,pattern={{major}}
223
- type=semver,pattern={{major}}.{{minor}}
224
- type=semver,pattern={{major}}.{{minor}}.{{patch}}
225
-
226
- # Build and push Docker image with Buildx (don't push on PR)
227
- # https://github.com/docker/build-push-action
228
- - name : Build and push Docker image
229
- uses : docker/build-push-action@v4
230
- with :
231
- context : ./daemon/
232
- platforms : linux/amd64,linux/arm64,linux/arm/v7
233
- push : ${{ github.event_name != 'pull_request' }}
234
- tags : ${{ steps.meta.outputs.tags }}
235
- labels : ${{ steps.meta.outputs.labels }}
236
-
237
- # Push client image to Docker Hub.
238
- push-client-to-docker-hub :
239
-
240
- # Ensure test job passes before pushing image.
241
- needs : test-client
242
-
243
- name : Build Client & Push to Docker Hub
244
- runs-on : ubuntu-latest
245
- permissions :
246
- contents : read
247
- packages : write
248
-
249
- steps :
250
- - name : Checkout
251
- uses : actions/checkout@v3
252
-
253
- - name : Set up QEMU
254
- uses : docker/setup-qemu-action@v2
255
-
256
- - name : Set up Docker Buildx
257
- uses : docker/setup-buildx-action@v2
258
-
259
- # Login against a Docker registry except on PR
260
- # https://github.com/docker/login-action
261
- - name : Log into registry ${{ env.DOCKER_REGISTRY }}
162
+ # Login to GitHub Container Registry except on PR
163
+ - name : Login to GitHub Container Registry
262
164
if : github.event_name != 'pull_request'
263
- uses : docker/login-action@v2
165
+ uses : docker/login-action@v3
264
166
with :
265
- registry : ${{ env.DOCKER_REGISTRY }}
266
- username : ${{ secrets.DOCKERHUB_USERNAME }}
267
- password : ${{ secrets.DOCKERHUB_TOKEN }}
167
+ registry : ${{ env.GITHUB_REGISTRY }}
168
+ username : ${{ github.repository_owner }}
169
+ password : ${{ secrets.GITHUB_TOKEN }}
268
170
269
171
# Extract metadata (tags, labels) for Docker
270
- # https://github.com/docker/metadata-action
271
172
- name : Extract Docker metadata
272
173
id : meta
273
- uses : docker/metadata-action@v4
174
+ uses : docker/metadata-action@v5
274
175
with :
275
- images : ${{ env.IMAGE_NAME_CLIENT }}
176
+ images : |
177
+ ${{ env.IMAGE_NAME_CLIENT }}
178
+ ${{ env.GITHUB_REGISTRY }}/${{ env.IMAGE_NAME_CLIENT }}
276
179
tags : |
277
180
type=ref,event=branch
278
181
type=semver,pattern={{version}}
@@ -281,9 +184,8 @@ jobs:
281
184
type=semver,pattern={{major}}.{{minor}}.{{patch}}
282
185
283
186
# Build and push Docker image with Buildx (don't push on PR)
284
- # https://github.com/docker/build-push-action
285
187
- name : Build and push Docker image
286
- uses : docker/build-push-action@v4
188
+ uses : docker/build-push-action@v5
287
189
with :
288
190
context : .
289
191
platforms : linux/amd64,linux/arm64,linux/arm/v7
0 commit comments