From 13c7dc63a510f4eed8ce41704c51915a84297331 Mon Sep 17 00:00:00 2001 From: Antoine Paletta Date: Mon, 18 Mar 2024 18:09:11 +0000 Subject: [PATCH 1/2] build: add latest tag to docker image being pushed --- .github/workflows/build-base-image.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build-base-image.yml b/.github/workflows/build-base-image.yml index b852c31..e4b3343 100644 --- a/.github/workflows/build-base-image.yml +++ b/.github/workflows/build-base-image.yml @@ -75,6 +75,19 @@ jobs: with: project_name: ${{ needs.prepare-environment.outputs.project_name }} project_version: ${{ needs.prepare-environment.outputs.project_version }} + push: false + target: base3 + secrets: inherit + + push-and-tag-base-image-as-latest: + name: Push and Tag Base Image as Latest + needs: + - prepare-environment + - build-base3-image + uses: ./.github/workflows/build-image.yml + with: + project_name: ${{ needs.prepare-environment.outputs.project_name }} + project_version: latest push: true target: base3 secrets: inherit From 8a1356c3d1ba3d21c11daad987365be876f2808b Mon Sep 17 00:00:00 2001 From: Antoine Paletta Date: Mon, 18 Mar 2024 18:11:27 +0000 Subject: [PATCH 2/2] build: add latest tag only on main --- .github/workflows/build-base-image.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build-base-image.yml b/.github/workflows/build-base-image.yml index e4b3343..af3ff60 100644 --- a/.github/workflows/build-base-image.yml +++ b/.github/workflows/build-base-image.yml @@ -80,6 +80,7 @@ jobs: secrets: inherit push-and-tag-base-image-as-latest: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' name: Push and Tag Base Image as Latest needs: - prepare-environment