From d2b9c0445fb6c91c4bea5d6cbb0144bd572211a0 Mon Sep 17 00:00:00 2001 From: Robert Waffen Date: Tue, 13 Sep 2022 12:22:47 +0200 Subject: [PATCH] do not add version if main --- .github/workflows/build_docker.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_docker.yml b/.github/workflows/build_docker.yml index 28d6411a..fcadc31f 100644 --- a/.github/workflows/build_docker.yml +++ b/.github/workflows/build_docker.yml @@ -31,11 +31,11 @@ jobs: import re from packaging.version import parse version = "${{ github.ref }}".replace("refs/tags/v", "") - print(version) image = "ghcr.io/${{ github.repository }}" tags = set() # full version - tags.add(f"{image}:{version}") + if not version == 'refs/heads/main': + tags.add(f"{image}:{version}") if version == 'refs/heads/main': tags.add(f"{image}:development") if not parse(version).is_prerelease: