From add36e0e1bc370f682ca6f44b2eee7e45753935c Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 9 Jul 2024 15:38:10 +1000 Subject: [PATCH 1/3] docker-build-push: Version bump for all called actions --- .github/actions/docker-build-push/action.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/docker-build-push/action.yml b/.github/actions/docker-build-push/action.yml index 99c18ad..1167d3d 100644 --- a/.github/actions/docker-build-push/action.yml +++ b/.github/actions/docker-build-push/action.yml @@ -44,14 +44,14 @@ runs: using: "composite" steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Buildx is currently required to use a subdirectory w/ build-push-action - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3.4.0 - name: Log in to container registry - uses: docker/login-action@v2 + uses: docker/login-action@v2.3.0 with: registry: ${{ inputs.container-registry }} username: ${{ github.repository_owner }} @@ -59,14 +59,14 @@ runs: - name: Extract metadata (tags, labels) for Docker id: meta - uses: docker/metadata-action@v4 + uses: docker/metadata-action@v5.5.1 with: images: ${{ inputs.container-registry }}/${{ inputs.image-name }} flavor: | latest=true - name: Build and push Docker image - uses: docker/build-push-action@v3 + uses: docker/build-push-action@v6.3.0 with: context: "{{defaultContext}}:${{ inputs.dockerfile-directory }}" build-args: ${{ inputs.build-args }} From 7eced36a673174f7a49363fe1f992f995786592d Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 9 Jul 2024 15:38:42 +1000 Subject: [PATCH 2/3] docker-build-push: don't logout at end of job, set one latest tag instead of multiple --- .github/actions/docker-build-push/action.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/actions/docker-build-push/action.yml b/.github/actions/docker-build-push/action.yml index 1167d3d..f09385b 100644 --- a/.github/actions/docker-build-push/action.yml +++ b/.github/actions/docker-build-push/action.yml @@ -56,6 +56,7 @@ runs: registry: ${{ inputs.container-registry }} username: ${{ github.repository_owner }} password: ${{ github.token }} + logout: false - name: Extract metadata (tags, labels) for Docker id: meta @@ -74,8 +75,8 @@ runs: file: ${{ inputs.dockerfile-name }} push: ${{ inputs.push }} target: ${{ inputs.target }} - tags: ${{ steps.meta.outputs.tags }} - labels: ${{ steps.meta.outputs.labels }} + tags: ${{ inputs.image-name }}:latest + labels: ${{ steps.meta.ouputs.labels }} cache-from: type=gha cache-to: type=gha,mode=max From 092c4268169f67a99971a49819abef22815df5c6 Mon Sep 17 00:00:00 2001 From: Tommy Gatti Date: Tue, 9 Jul 2024 15:51:49 +1000 Subject: [PATCH 3/3] docker-build-push: Added correct version for login-action --- .github/actions/docker-build-push/action.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/actions/docker-build-push/action.yml b/.github/actions/docker-build-push/action.yml index f09385b..386083b 100644 --- a/.github/actions/docker-build-push/action.yml +++ b/.github/actions/docker-build-push/action.yml @@ -51,7 +51,7 @@ runs: uses: docker/setup-buildx-action@v3.4.0 - name: Log in to container registry - uses: docker/login-action@v2.3.0 + uses: docker/login-action@v3.2.0 with: registry: ${{ inputs.container-registry }} username: ${{ github.repository_owner }}