From dee4e74eee0ad0ca08d9f527b115e373f79a2321 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Tue, 17 Sep 2024 17:19:20 +0800 Subject: [PATCH] add semantic version tags to Docker image --- .github/workflows/test-and-publish.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index 6a6c4ba7..df26031c 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -3,9 +3,6 @@ name: Test and Publish on: push: -env: - IMAGE_NAME: ${{ vars.DOCKER_ORG }}/idp-id-broker - jobs: tests: name: Tests @@ -36,7 +33,11 @@ jobs: id: meta uses: docker/metadata-action@v5 with: - images: ${{ env.IMAGE_NAME }} + images: ${{ vars.DOCKER_ORG }}/${{ github.event.repository.name }} + tags: | + type=ref,event=branch + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} - name: Build and push Docker image uses: docker/build-push-action@v5 with: