From cb67f8f47356177c5f078f46f64625d6254a1d79 Mon Sep 17 00:00:00 2001 From: Barry d'Hoine Date: Wed, 11 Dec 2024 10:53:48 +0100 Subject: [PATCH] Create seperate job for manifest --- .github/workflows/build.yml | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a4f35c7..b0b6a63 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -8,6 +8,7 @@ env: jobs: build-images: + name: Build images permissions: contents: read packages: write @@ -41,7 +42,7 @@ jobs: uses: docker/setup-buildx-action@v3 with: platforms: linux/${{ matrix.arch }} - - name: Log in to the Container registry + - name: Log in to the container registry if: github.ref == 'refs/heads/main' uses: docker/login-action@v3 with: @@ -72,8 +73,25 @@ jobs: subject-name: ${{ env.registry }}/${{ github.repository }} subject-digest: ${{ steps.push.outputs.digest }} push-to-registry: true + + manifest: + name: Create manifest + if: github.ref == 'refs/heads/main' + permissions: + packages: write + id-token: write + strategy: + matrix: + arch: [ arm64, amd64 ] + runs-on: ubuntu-latest + steps: + - name: Log in to the container registry + uses: docker/login-action@v3 + with: + registry: ${{ env.registry }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} - name: Push manifest to registry - if: github.ref == 'refs/heads/main' run: | IMAGE=${{ env.registry }}/${{ github.repository }}:${{ matrix.runmode }}-${{ env.aem_sdk_version }} docker manifest create \