From 36dffaca70aa84d44c4f7beb95b42aebd773a24d Mon Sep 17 00:00:00 2001 From: Antoine Paletta <98616558+apaletta3@users.noreply.github.com> Date: Tue, 19 Mar 2024 10:06:29 +0100 Subject: [PATCH] build: add latest tag to docker image being pushed (#99) * build: add latest tag to docker image being pushed * build: add latest tag only on main --- .github/workflows/build-base-image.yml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/.github/workflows/build-base-image.yml b/.github/workflows/build-base-image.yml index b852c31..af3ff60 100644 --- a/.github/workflows/build-base-image.yml +++ b/.github/workflows/build-base-image.yml @@ -75,6 +75,20 @@ 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: + if: github.event_name == 'push' && github.ref == 'refs/heads/main' + 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