From 3709830da944d3f3810ec08708dcfe7b824d72f9 Mon Sep 17 00:00:00 2001 From: briskt <3172830+briskt@users.noreply.github.com> Date: Thu, 7 Nov 2024 12:06:10 +0800 Subject: [PATCH] don't push branch tags to GHCR because it doesn't like tags with a slash --- .github/workflows/test-and-publish.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-and-publish.yml b/.github/workflows/test-and-publish.yml index c7558c51..4f77b74e 100644 --- a/.github/workflows/test-and-publish.yml +++ b/.github/workflows/test-and-publish.yml @@ -62,6 +62,7 @@ jobs: - name: Build and push Docker image to GitHub Container Registry uses: docker/build-push-action@v5 + if: startsWith(github.ref, 'refs/tags') with: context: . push: true @@ -69,4 +70,4 @@ jobs: ghcr.io/${{ github.repository }}:${{ github.ref_name }} labels: ${{ steps.meta.outputs.labels }} build-args: | - GITHUB_REF_NAME=${{ github.ref_name }} \ No newline at end of file + GITHUB_REF_NAME=${{ github.ref_name }}