From dcbc42c9bd7de140f06f0c11e4bd3b9a1ceed169 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 8 Jan 2024 19:13:44 +0000 Subject: [PATCH 1/8] Bump actions/upload-artifact from 3 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 3 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fe9d07e..0438206 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -127,7 +127,7 @@ jobs: digest='${{ steps.build.outputs.digest }}' touch "/tmp/digests/${digest#sha256:}" - name: Upload digest - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 with: name: digests path: /tmp/digests/* From b11e0730f2971c919ff9a1252252d91ece7b5ec0 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sat, 9 Mar 2024 14:59:38 -0300 Subject: [PATCH 2/8] Update download-artifact to v4 too --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0438206..7765ae8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Download digests - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 with: name: digests path: /tmp/digests From 77887d3c7337013895f94c32f4db8c76d502869a Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sat, 9 Mar 2024 18:25:08 -0300 Subject: [PATCH 3/8] More fixes to upload and download artifacts --- .github/workflows/ci.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 7765ae8..4d07af9 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -129,7 +129,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests + name: digests-${{ matrix.platform }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 @@ -143,7 +143,8 @@ jobs: - name: Download digests uses: actions/download-artifact@v4 with: - name: digests + pattern: digests-* + merge-multiple: true path: /tmp/digests - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 From 6df57a757cf11ad00e99062e3fe02f4dfad37b59 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sat, 9 Mar 2024 18:35:21 -0300 Subject: [PATCH 4/8] Try again --- .github/workflows/ci.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4d07af9..a671dc6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -129,7 +129,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digests-${{ matrix.platform }} + name: digest-${{ steps.build.outputs.digest }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 @@ -143,7 +143,7 @@ jobs: - name: Download digests uses: actions/download-artifact@v4 with: - pattern: digests-* + pattern: digest-* merge-multiple: true path: /tmp/digests - name: Set up Docker Buildx From 5aa0ec7988f5a5ce37cb233c1659585840707efe Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sat, 9 Mar 2024 19:04:37 -0300 Subject: [PATCH 5/8] Fix again --- .github/workflows/ci.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a671dc6..abbb3bd 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,12 +52,12 @@ jobs: strategy: fail-fast: false matrix: - platform: - - linux/amd64 - - linux/386 - - linux/arm/v6 - - linux/arm/v7 - - linux/arm64 + arch: + - amd64 + - '386' + - arm/v6 + - arm/v7 + - arm64 steps: - name: Checkout uses: actions/checkout@v4 @@ -79,7 +79,7 @@ jobs: id: cache-flags run: | # Set the cache-to output - echo 'cache-to=type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}' >> "${GITHUB_OUTPUT}" + echo 'cache-to=type=gha,scope=${{ github.ref_name }}-${{ matrix.arch }}' >> "${GITHUB_OUTPUT}" # Set the cache-from output if [[ '${{ github.event_name }}' == 'push' ]]; then @@ -87,10 +87,10 @@ jobs: # Use cache from the branch when building a tag branch="$(git branch -r --contains '${{ github.ref }}')" branch="${branch##*/}" - echo "cache-from=type=gha,scope=${branch}-${{ matrix.platform }}" >> "${GITHUB_OUTPUT}" + echo "cache-from=type=gha,scope=${branch}-${{ matrix.arch }}" >> "${GITHUB_OUTPUT}" else # Use cache from the same branch when not building a tag - echo 'cache-from=type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}' >> "${GITHUB_OUTPUT}" + echo 'cache-from=type=gha,scope=${{ github.ref_name }}-${{ matrix.arch }}' >> "${GITHUB_OUTPUT}" fi else # Use cache from target branch too when building a pull request @@ -102,8 +102,8 @@ jobs: echo "cache-from<<${EOF}" >> "${GITHUB_OUTPUT}" printf '%s\n' \ - "type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}" \ - "type=gha,scope=${{ github.base_ref }}-${{ matrix.platform }}" \ + "type=gha,scope=${{ github.ref_name }}-${{ matrix.arch }}" \ + "type=gha,scope=${{ github.base_ref }}-${{ matrix.arch }}" \ >> "${GITHUB_OUTPUT}" echo "${EOF}" >> "${GITHUB_OUTPUT}" @@ -113,7 +113,7 @@ jobs: uses: docker/build-push-action@v5 with: context: asterisk - platforms: ${{ matrix.platform }} + platforms: linux/${{ matrix.arch }} labels: ${{ needs.prepare.outputs.meta-labels }} outputs: | type=image,name=${{ needs.prepare.outputs.image }},push-by-digest=true,name-canonical=true,push=${{ needs.prepare.outputs.push }} @@ -129,7 +129,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digest-${{ steps.build.outputs.digest }} + name: digest-${{ matrix.arch }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 From dfe5af2325a67985177094fe9e415d7bdfcc0eab Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sun, 10 Mar 2024 14:33:25 -0300 Subject: [PATCH 6/8] Revert "Fix again" This reverts commit 5aa0ec7988f5a5ce37cb233c1659585840707efe. --- .github/workflows/ci.yaml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index abbb3bd..a671dc6 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -52,12 +52,12 @@ jobs: strategy: fail-fast: false matrix: - arch: - - amd64 - - '386' - - arm/v6 - - arm/v7 - - arm64 + platform: + - linux/amd64 + - linux/386 + - linux/arm/v6 + - linux/arm/v7 + - linux/arm64 steps: - name: Checkout uses: actions/checkout@v4 @@ -79,7 +79,7 @@ jobs: id: cache-flags run: | # Set the cache-to output - echo 'cache-to=type=gha,scope=${{ github.ref_name }}-${{ matrix.arch }}' >> "${GITHUB_OUTPUT}" + echo 'cache-to=type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}' >> "${GITHUB_OUTPUT}" # Set the cache-from output if [[ '${{ github.event_name }}' == 'push' ]]; then @@ -87,10 +87,10 @@ jobs: # Use cache from the branch when building a tag branch="$(git branch -r --contains '${{ github.ref }}')" branch="${branch##*/}" - echo "cache-from=type=gha,scope=${branch}-${{ matrix.arch }}" >> "${GITHUB_OUTPUT}" + echo "cache-from=type=gha,scope=${branch}-${{ matrix.platform }}" >> "${GITHUB_OUTPUT}" else # Use cache from the same branch when not building a tag - echo 'cache-from=type=gha,scope=${{ github.ref_name }}-${{ matrix.arch }}' >> "${GITHUB_OUTPUT}" + echo 'cache-from=type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}' >> "${GITHUB_OUTPUT}" fi else # Use cache from target branch too when building a pull request @@ -102,8 +102,8 @@ jobs: echo "cache-from<<${EOF}" >> "${GITHUB_OUTPUT}" printf '%s\n' \ - "type=gha,scope=${{ github.ref_name }}-${{ matrix.arch }}" \ - "type=gha,scope=${{ github.base_ref }}-${{ matrix.arch }}" \ + "type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}" \ + "type=gha,scope=${{ github.base_ref }}-${{ matrix.platform }}" \ >> "${GITHUB_OUTPUT}" echo "${EOF}" >> "${GITHUB_OUTPUT}" @@ -113,7 +113,7 @@ jobs: uses: docker/build-push-action@v5 with: context: asterisk - platforms: linux/${{ matrix.arch }} + platforms: ${{ matrix.platform }} labels: ${{ needs.prepare.outputs.meta-labels }} outputs: | type=image,name=${{ needs.prepare.outputs.image }},push-by-digest=true,name-canonical=true,push=${{ needs.prepare.outputs.push }} @@ -129,7 +129,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digest-${{ matrix.arch }} + name: digest-${{ steps.build.outputs.digest }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 From f3c077c0a9673155836fe4ae3d45ef8c0adb69e6 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sun, 10 Mar 2024 14:36:06 -0300 Subject: [PATCH 7/8] Fix again --- .github/workflows/ci.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index a671dc6..e202f4e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -78,6 +78,8 @@ jobs: - name: Set cache flags id: cache-flags run: | + echo "platform-normalized=$(echo '${{ matrix.platform }}' | tr / -)" >> "${GITHUB_OUTPUT} + # Set the cache-to output echo 'cache-to=type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}' >> "${GITHUB_OUTPUT}" @@ -129,7 +131,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digest-${{ steps.build.outputs.digest }} + name: digest-${{ steps.cache-flags.outputs.platform-normalized }} path: /tmp/digests/* if-no-files-found: error retention-days: 1 From 20aa42cab7e0bf5c4edce77b32fc6263fee40652 Mon Sep 17 00:00:00 2001 From: Felipe Santos Date: Sun, 10 Mar 2024 15:10:26 -0300 Subject: [PATCH 8/8] Fix again --- .github/workflows/ci.yaml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e202f4e..95058a1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -75,10 +75,10 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.GITHUB_TOKEN }} - - name: Set cache flags - id: cache-flags + - name: Set vars + id: vars run: | - echo "platform-normalized=$(echo '${{ matrix.platform }}' | tr / -)" >> "${GITHUB_OUTPUT} + echo "artifact-name=digest-$(echo '${{ matrix.platform }}' | tr / -)" >> "${GITHUB_OUTPUT}" # Set the cache-to output echo 'cache-to=type=gha,scope=${{ github.ref_name }}-${{ matrix.platform }}' >> "${GITHUB_OUTPUT}" @@ -120,9 +120,9 @@ jobs: outputs: | type=image,name=${{ needs.prepare.outputs.image }},push-by-digest=true,name-canonical=true,push=${{ needs.prepare.outputs.push }} cache-from: | - ${{ steps.cache-flags.outputs.cache-from }} + ${{ steps.vars.outputs.cache-from }} cache-to: | - ${{ steps.cache-flags.outputs.cache-to }} + ${{ steps.vars.outputs.cache-to }} - name: Export digest run: | mkdir -p /tmp/digests @@ -131,7 +131,7 @@ jobs: - name: Upload digest uses: actions/upload-artifact@v4 with: - name: digest-${{ steps.cache-flags.outputs.platform-normalized }} + name: ${{ steps.vars.outputs.artifact-name }} path: /tmp/digests/* if-no-files-found: error retention-days: 1