From cfe059da52ae186bd21f181fc3ca197b0b112385 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:34:43 +0100 Subject: [PATCH 1/5] ci: fix release artifacts processing --- .github/workflows/release-docker-image.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index e7eea70ac8..f6aca80283 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -82,7 +82,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: ${{ env.DIGEST_NAME }} + name: ${{ env.DIGEST_NAME }}-${{ matrix.platform }} path: ${{ env.DIGEST_DIR_PATH }}/* if-no-files-found: error retention-days: 1 @@ -93,10 +93,11 @@ jobs: runs-on: ubuntu-24.04 steps: - name: Download digests - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: - name: ${{ env.DIGEST_NAME }} + pattern: ${{ env.DIGEST_NAME }}* path: ${{ env.DIGEST_DIR_PATH }} + merge-multiple: true - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From a024cfcc90e07b89c6fdfa19b3c40c0bd33b4d85 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 13 Dec 2024 12:49:54 +0100 Subject: [PATCH 2/5] chore: replace slash in arch --- .github/workflows/release-docker-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index f6aca80283..eaf5dce711 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -82,7 +82,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: ${{ env.DIGEST_NAME }}-${{ matrix.platform }} + name: ${{ env.DIGEST_NAME }}-${{ matrix.platform.replace('/','-') }} path: ${{ env.DIGEST_DIR_PATH }}/* if-no-files-found: error retention-days: 1 From 077c71a1b3c4c371104df32ab01a69e099ecdfb1 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:02:24 +0100 Subject: [PATCH 3/5] fix: digest name slash --- .github/workflows/release-docker-image.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index eaf5dce711..68acbe531a 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -26,7 +26,6 @@ on: description: Cargo profile. i.e. release, dev default: release env: - DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }} DIGEST_DIR_PATH: /tmp/digests jobs: @@ -79,10 +78,16 @@ jobs: touch "${{ env.DIGEST_DIR_PATH }}/${digest#sha256:}" ls -lah ${{ env.DIGEST_DIR_PATH }} + - name: Make DIGEST_NAME unique + run: | + DIGEST_NAME="digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }}-${{ matrix.platform}}" + # replace slash (/) with dash (-) + echo "DIGEST_NAME=${DIGEST_NAME//\//-}" >> $GITHUB_ENV + - name: Upload digest uses: actions/upload-artifact@v4 with: - name: ${{ env.DIGEST_NAME }}-${{ matrix.platform.replace('/','-') }} + name: ${{ env.DIGEST_NAME }} path: ${{ env.DIGEST_DIR_PATH }}/* if-no-files-found: error retention-days: 1 From cc400614509080f01f538e4768a8f7e2796a175c Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:09:50 +0100 Subject: [PATCH 4/5] fix: digest platform --- .github/workflows/release-docker-image.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 68acbe531a..4478c9b22c 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -26,6 +26,7 @@ on: description: Cargo profile. i.e. release, dev default: release env: + DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }} DIGEST_DIR_PATH: /tmp/digests jobs: @@ -80,14 +81,14 @@ jobs: - name: Make DIGEST_NAME unique run: | - DIGEST_NAME="digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }}-${{ matrix.platform}}" + PLATFORM="${{ matrix.platform}}" # replace slash (/) with dash (-) - echo "DIGEST_NAME=${DIGEST_NAME//\//-}" >> $GITHUB_ENV + echo "DIGEST_PLATFORM=${PLATFORM//\//-}" >> $GITHUB_ENV - name: Upload digest uses: actions/upload-artifact@v4 with: - name: ${{ env.DIGEST_NAME }} + name: ${{ env.DIGEST_NAME }}-${{ DIGEST_PLATFORM }} path: ${{ env.DIGEST_DIR_PATH }}/* if-no-files-found: error retention-days: 1 From 755299a42e5b11b6af7d8259473c09e145b2a2aa Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:13:06 +0100 Subject: [PATCH 5/5] typo --- .github/workflows/release-docker-image.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 4478c9b22c..51b829982c 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -79,16 +79,16 @@ jobs: touch "${{ env.DIGEST_DIR_PATH }}/${digest#sha256:}" ls -lah ${{ env.DIGEST_DIR_PATH }} - - name: Make DIGEST_NAME unique + - name: Format DIGEST_PLATFORM run: | - PLATFORM="${{ matrix.platform}}" + PLATFORM="${{ matrix.platform }}" # replace slash (/) with dash (-) echo "DIGEST_PLATFORM=${PLATFORM//\//-}" >> $GITHUB_ENV - name: Upload digest uses: actions/upload-artifact@v4 with: - name: ${{ env.DIGEST_NAME }}-${{ DIGEST_PLATFORM }} + name: ${{ env.DIGEST_NAME }}-${{ env.DIGEST_PLATFORM }} path: ${{ env.DIGEST_DIR_PATH }}/* if-no-files-found: error retention-days: 1