6
6
- main
7
7
paths :
8
8
- package.json # Please only commit this file, so we don't need to wait for all the other CI jobs to finish.
9
- env :
10
- REGISTRY_IMAGE : salamaashoush/turbo-remote-cache-rs
9
+
11
10
concurrency :
12
11
group : ${{ github.workflow }}-${{ github.ref }}
13
12
cancel-in-progress : true
@@ -123,7 +122,7 @@ jobs:
123
122
*.tar.gz
124
123
125
124
npm-publish :
126
- name : Publish
125
+ name : Npm Publish
127
126
if : needs.check.outputs.version_changed == 'true'
128
127
needs : [build, check]
129
128
runs-on : ubuntu-latest
@@ -185,31 +184,12 @@ jobs:
185
184
fail_on_unmatched_files : true
186
185
target_commitish : ${{ github.sha }}
187
186
188
- docker-build :
187
+ docker :
188
+ name : Docker
189
189
needs : check
190
190
if : needs.check.outputs.version_changed == 'true'
191
191
runs-on : ubuntu-latest
192
- strategy :
193
- fail-fast : false
194
- matrix :
195
- platform :
196
- - linux/amd64
197
- - linux/arm64
198
192
steps :
199
- - name : Prepare
200
- run : |
201
- platform=${{ matrix.platform }}
202
- echo "PLATFORM_PAIR=${platform//\//-}" >> $GITHUB_ENV
203
-
204
- - name : Docker meta
205
- id : meta
206
- uses : docker/metadata-action@v5
207
- with :
208
- images : ${{ env.REGISTRY_IMAGE }}
209
- tags : |
210
- # set latest tag for default branch
211
- type=raw,value=latest,enable={{is_default_branch}}
212
-
213
193
- name : Set up QEMU
214
194
uses : docker/setup-qemu-action@v3
215
195
@@ -222,65 +202,9 @@ jobs:
222
202
username : ${{ secrets.DOCKERHUB_USERNAME }}
223
203
password : ${{ secrets.DOCKERHUB_TOKEN }}
224
204
225
- - name : Build and push by digest
226
- id : build
205
+ - name : Build and push
227
206
uses : docker/build-push-action@v6
228
207
with :
229
- platforms : ${{ matrix.platform }}
230
- tags : ${{ steps.meta.outputs.tags }}
231
- labels : ${{ steps.meta.outputs.labels }}
232
- outputs : type=image,name=${{ env.REGISTRY_IMAGE }},push-by-digest=true,name-canonical=true,push=true
233
-
234
- - name : Export digest
235
- run : |
236
- mkdir -p /tmp/digests
237
- digest="${{ steps.build.outputs.digest }}"
238
- touch "/tmp/digests/${digest#sha256:}"
239
-
240
- - name : Upload digest
241
- uses : actions/upload-artifact@v4
242
- with :
243
- name : digests-${{ env.PLATFORM_PAIR }}
244
- path : /tmp/digests/*
245
- if-no-files-found : error
246
- retention-days : 1
247
-
248
- docker-merge :
249
- runs-on : ubuntu-latest
250
- needs :
251
- - docker-build
252
- steps :
253
- - name : Download digests
254
- uses : actions/download-artifact@v4
255
- with :
256
- path : /tmp/digests
257
- pattern : digests-*
258
- merge-multiple : true
259
-
260
- - name : Set up Docker Buildx
261
- uses : docker/setup-buildx-action@v3
262
-
263
- - name : Docker meta
264
- id : meta
265
- uses : docker/metadata-action@v5
266
- with :
267
- images : ${{ env.REGISTRY_IMAGE }}
268
- tags : |
269
- # set latest tag for default branch
270
- type=raw,value=latest,enable={{is_default_branch}}
271
-
272
- - name : Login to Docker Hub
273
- uses : docker/login-action@v3
274
- with :
275
- username : ${{ secrets.DOCKERHUB_USERNAME }}
276
- password : ${{ secrets.DOCKERHUB_TOKEN }}
277
-
278
- - name : Create manifest list and push
279
- working-directory : /tmp/digests
280
- run : |
281
- docker buildx imagetools create $(jq -cr '.tags | map("-t " + .) | join(" ")' <<< "$DOCKER_METADATA_OUTPUT_JSON") \
282
- $(printf '${{ env.REGISTRY_IMAGE }}@sha256:%s ' *)
283
-
284
- - name : Inspect image
285
- run : |
286
- docker buildx imagetools inspect ${{ env.REGISTRY_IMAGE }}:${{ steps.meta.outputs.version }}
208
+ platforms : linux/amd64,linux/arm64
209
+ push : true
210
+ tags : salamaashoush/turbo-remote-cache-rs:latest
0 commit comments