Skip to content

Commit 3df7f45

Browse files
garvinhickinglinawolf
authored andcommitted
[TASK] Use GitHub actions/download-artifact@v4
The old @V3 version will be retired in December with two brownouts later in November. This commits will: * Make distinct unmutable digests during the artifact CREATION (prefixed "digests-linux-amd64", "digests-linux-arm-v7", "digests-linux-arm64") and upload them * On the "merge" step, retrieve these digests and merge them into one single digest that is then used for the docker imagetools creation command. Hat tips to Andreas Kienast and Stefan Bürk! :)
1 parent fc9684d commit 3df7f45

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

.github/workflows/docker.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ jobs:
2727
run: |
2828
echo IMAGE_NAME=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
2929
30+
- name: Set platform name variable
31+
run: echo "PLATFORM_NAME=${{ matrix.platform }}" | sed 's/\//-/g' >> $GITHUB_ENV
32+
3033
- name: Docker meta
3134
id: meta
3235
uses: docker/metadata-action@v4
@@ -75,9 +78,10 @@ jobs:
7578
touch "/tmp/digests/${digest#sha256:}"
7679
-
7780
name: Upload digest
78-
uses: actions/upload-artifact@v3
81+
uses: actions/upload-artifact@v4
7982
with:
80-
name: digests
83+
name: digests-${{ env.PLATFORM_NAME }}
84+
overwrite: true
8185
path: /tmp/digests/*
8286
if-no-files-found: error
8387
retention-days: 1
@@ -94,9 +98,10 @@ jobs:
9498
9599
-
96100
name: Download digests
97-
uses: actions/download-artifact@v3
101+
uses: actions/download-artifact@v4
98102
with:
99-
name: digests
103+
pattern: digests-*
104+
merge-multiple: true
100105
path: /tmp/digests
101106
-
102107
name: Set up Docker Buildx

0 commit comments

Comments
 (0)