From ac6b0522d6fd6c6f8b5c09f6eb4263d1a69912f0 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:46:25 +0000 Subject: [PATCH 1/2] Initial plan From 9d328628a6bbf7f8b7ec5b98211a5ba7d15ffa4d Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 9 Dec 2025 15:49:30 +0000 Subject: [PATCH 2/2] Fix invalid Docker tag format by restricting SHA tag generation The issue was that the SHA tag rule `type=sha,prefix={{branch}}-` was generating invalid tags like `-9f8980e` when triggered on pull requests, because the {{branch}} variable is empty for PR events. This violates Docker's naming conventions which don't allow tags starting with a hyphen. The fix restricts SHA tag generation to only run on the default branch by adding `enable={{is_default_branch}}`. For pull requests, the existing `type=ref,event=pr` rule already provides appropriate tags like `pr-6`. Co-authored-by: xrh0905 <29017419+xrh0905@users.noreply.github.com> --- .github/workflows/docker-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index d902dcc..7a556da 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -48,7 +48,7 @@ jobs: type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} type=semver,pattern={{major}} - type=sha,prefix={{branch}}- + type=sha,prefix={{branch}}-,enable={{is_default_branch}} type=raw,value=latest,enable=${{ github.ref == 'refs/heads/edge' }} - name: Build and push Docker image