From 4b46b8812d21713870cda8feb41966ca8827d73e Mon Sep 17 00:00:00 2001 From: Lars Kaesberg <33939116+lkaesberg@users.noreply.github.com> Date: Thu, 28 Mar 2024 19:24:06 +0100 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c07097a..3aa13da 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,6 +3,9 @@ on: push: branches: - main + tags: + - '*' # This will trigger the workflow for any tag push + jobs: build_and_push_docker_image: runs-on: ubuntu-latest @@ -23,11 +26,15 @@ jobs: with: context: frontend/. push: true - tags: ghcr.io/${{ github.repository }}/frontend:latest + tags: | + ghcr.io/${{ github.repository }}/frontend:latest + ghcr.io/${{ github.repository }}/frontend:${GITHUB_REF_NAME} - name: Build and push backend uses: docker/build-push-action@v2 with: context: backend/. push: true - tags: ghcr.io/${{ github.repository }}/backend:latest + tags: | + ghcr.io/${{ github.repository }}/backend:latest + ghcr.io/${{ github.repository }}/backend:${GITHUB_REF_NAME}