File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -175,7 +175,8 @@ jobs:
175175 # Query GHCR for the version ID matching this tag
176176 VERSION_ID=$(gh api --paginate -H "Accept: application/vnd.github+json" \
177177 /orgs/triggerdotdev/packages/container/trigger.dev/versions \
178- --jq ".[] | select(.metadata.container.tags[] == \"${TAG}\") | .id")
178+ --jq ".[] | select(.metadata.container.tags[] == \"${TAG}\") | .id" \
179+ | head -1)
179180
180181 if [ -z "$VERSION_ID" ]; then
181182 echo "Warning: Could not find GHCR version ID for tag ${TAG}, skipping update"
@@ -185,9 +186,11 @@ jobs:
185186 DOCKER_URL="https://github.com/triggerdotdev/trigger.dev/pkgs/container/trigger.dev/${VERSION_ID}?tag=${TAG}"
186187 GENERIC_URL="https://github.com/triggerdotdev/trigger.dev/pkgs/container/trigger.dev"
187188
188- # Get current release body and replace the generic link with the tag-specific one
189+ # Get current release body and replace the generic link with the tag-specific one.
190+ # Use word boundary after GENERIC_URL (closing paren) to avoid matching URLs that
191+ # already have a version ID appended (idempotent on re-runs).
189192 gh release view "${TAG}" --json body --jq '.body' > /tmp/release-body.md
190- sed -i "s|${GENERIC_URL}|${DOCKER_URL}|g" /tmp/release-body.md
193+ sed -i "s|${GENERIC_URL}) |${DOCKER_URL}) |g" /tmp/release-body.md
191194
192195 gh release edit "${TAG}" --notes-file /tmp/release-body.md
193196
You can’t perform that action at this time.
0 commit comments