From cd51b0768326f48360719843bae78a2a8988ac81 Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 30 Oct 2024 13:34:12 +0530 Subject: [PATCH 1/3] Pushing Semver tagging and removed the branch tagging --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 61f2d42..ad7a0e5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,9 +31,11 @@ jobs: with: images: ${{ vars.DOCKER_ORG }}/traefik-https-proxy tags: | - type=ref,event=branch # set latest tag for main type=raw,value=latest,enable=${{ github.ref_name == 'main' }} + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=semver,pattern={{major}} - name: Build and push Docker image uses: docker/build-push-action@v5 From 88e547da32a0e0dff2f7f9fe6a67eec42fad6b3f Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 30 Oct 2024 13:44:37 +0530 Subject: [PATCH 2/3] updated the docker compose cmd --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ad7a0e5..da58352 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,7 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Run tests - run: docker-compose -f action-services.yml run test + run: docker compose -f action-services.yml run test build-and-publish: name: Build and Publish From e26b7938636822a838743ee26f883f17b35953a8 Mon Sep 17 00:00:00 2001 From: Praveen Date: Wed, 30 Oct 2024 14:23:51 +0530 Subject: [PATCH 3/3] add step to trigger job only when tags are pushed --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da58352..efe58c5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,7 @@ jobs: build-and-publish: name: Build and Publish needs: test + if: startsWith(github.ref, 'refs/tags') runs-on: ubuntu-latest steps: - uses: actions/checkout@v4