From ca8c48abf40f59f57c64fc3d04bad4dba8de1a30 Mon Sep 17 00:00:00 2001 From: Barry d'Hoine Date: Wed, 11 Dec 2024 19:35:39 +0100 Subject: [PATCH] Use docker to push image --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ee8348..aea776f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,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 container registry if: github.ref == 'refs/heads/main' uses: docker/login-action@v3 with: @@ -54,7 +54,7 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.registry }}/${{ github.repository }} - - name: Build and push docker image + - name: Build docker image id: push uses: docker/build-push-action@v5 with: @@ -63,9 +63,12 @@ jobs: tags: ${{ env.registry }}/${{ github.repository }}:${{ matrix.runmode }}-${{ env.aem_sdk_version }}-${{ matrix.arch }} platforms: linux/${{ matrix.arch }} labels: ${{ steps.meta.outputs.labels }} + load: true build-args: | RUNMODE=${{ matrix.runmode }} PORT=${{ matrix.runmode == 'author' && '4502' || '4503' }} + - name: Push manifest to registry + run: docker push ${{ env.registry }}/${{ github.repository }}:${{ matrix.runmode }}-${{ env.aem_sdk_version }}-${{ matrix.arch }} - name: Generate artifact attestation if: github.ref == 'refs/heads/main' uses: actions/attest-build-provenance@v2 @@ -86,7 +89,7 @@ jobs: runs-on: ubuntu-latest needs: build-images steps: - - name: Log in to the container registry + - name: Log in to container registry uses: docker/login-action@v3 with: registry: ${{ env.registry }}