Skip to content

Commit b0500ca

Browse files
committed
🚑 revert to one docker build runner
1 parent fda9285 commit b0500ca

File tree

2 files changed

+13
-84
lines changed

2 files changed

+13
-84
lines changed

.changeset/rotten-carrots-perform.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"turbo-remote-cache-rs": patch
3+
---
4+
5+
Revert to one docker build runner

.github/workflows/release.yml

+8-84
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ on:
66
- main
77
paths:
88
- 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+
1110
concurrency:
1211
group: ${{ github.workflow }}-${{ github.ref }}
1312
cancel-in-progress: true
@@ -123,7 +122,7 @@ jobs:
123122
*.tar.gz
124123
125124
npm-publish:
126-
name: Publish
125+
name: Npm Publish
127126
if: needs.check.outputs.version_changed == 'true'
128127
needs: [build, check]
129128
runs-on: ubuntu-latest
@@ -185,31 +184,12 @@ jobs:
185184
fail_on_unmatched_files: true
186185
target_commitish: ${{ github.sha }}
187186

188-
docker-build:
187+
docker:
188+
name: Docker
189189
needs: check
190190
if: needs.check.outputs.version_changed == 'true'
191191
runs-on: ubuntu-latest
192-
strategy:
193-
fail-fast: false
194-
matrix:
195-
platform:
196-
- linux/amd64
197-
- linux/arm64
198192
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-
213193
- name: Set up QEMU
214194
uses: docker/setup-qemu-action@v3
215195

@@ -222,65 +202,9 @@ jobs:
222202
username: ${{ secrets.DOCKERHUB_USERNAME }}
223203
password: ${{ secrets.DOCKERHUB_TOKEN }}
224204

225-
- name: Build and push by digest
226-
id: build
205+
- name: Build and push
227206
uses: docker/build-push-action@v6
228207
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

Comments
 (0)