Skip to content

Commit 05e434d

Browse files
committed
ci: lowercase the ghcr image reference for the digest push
buildx's --output name= does no lowercasing (unlike metadata-action), so ghcr.io/Gitlawb/node is an invalid reference and the per-arch digest push would fail outright. Compute the lowercase image once in the resolve step and reuse it, matching the manifest job.
1 parent 7593540 commit 05e434d

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

‎.github/workflows/release.yml‎

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ jobs:
9292
esac
9393
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
9494
echo "version=${TAG#v}" >> "$GITHUB_OUTPUT"
95+
# ghcr requires a lowercase repository path, and unlike metadata-action,
96+
# buildx's `--output name=` does no lowercasing — a mixed-case owner
97+
# makes the digest push fail with "invalid reference format".
98+
echo "image=ghcr.io/${GITHUB_REPOSITORY,,}" >> "$GITHUB_OUTPUT"
9599
96100
- name: Checkout release tag
97101
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
@@ -143,7 +147,7 @@ jobs:
143147
context: .
144148
platforms: ${{ matrix.platform }}
145149
provenance: false
146-
outputs: type=image,name=ghcr.io/${{ github.repository }},push-by-digest=true,name-canonical=true,push=true
150+
outputs: type=image,name=${{ steps.rel.outputs.image }},push-by-digest=true,name-canonical=true,push=true
147151
cache-from: type=gha,scope=docker-${{ matrix.arch }}
148152
cache-to: type=gha,mode=max,scope=docker-${{ matrix.arch }}
149153

0 commit comments

Comments
 (0)