From da7658a4aaccaeadf2f360645002a189e660c2e4 Mon Sep 17 00:00:00 2001 From: Georges-Antoine Assi Date: Wed, 24 Jun 2026 10:26:30 -0400 Subject: [PATCH] Clarify GHCR-only preview build PR comment Rename the comment step to reflect that PR builds only push to GHCR, add a note explaining the hardcoded registry, and inline the image string into the updateComment call. Co-Authored-By: Claude Opus 4.8 (1M context) --- .github/workflows/test-build.yml | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-build.yml b/.github/workflows/test-build.yml index dc93c4e14..a6983e326 100644 --- a/.github/workflows/test-build.yml +++ b/.github/workflows/test-build.yml @@ -7,10 +7,10 @@ on: inputs: # trunk-ignore(checkov/CKV_GHA_7) branch: - description: "Git branch to build" + description: "Git branch" required: true registry: - description: "Container registry to push to" + description: "Container registry" required: true default: "ghcr" type: choice @@ -106,7 +106,8 @@ jobs: tags: ${{ steps.meta.outputs.tags }} target: full-image - - name: Comment PR with Docker image link + # PR builds always push to GHCR only, so the image link is hardcoded to GHCR. + - name: Comment PR with GHCR image link if: github.event_name == 'pull_request' uses: actions/github-script@v7 env: @@ -115,12 +116,9 @@ jobs: script: | const owner = context.repo.owner; const tag = process.env.HEAD_REF; - const images = [ - `ghcr.io/${owner}/romm-testing:${tag}`, - ]; github.rest.issues.updateComment({ comment_id: ${{ steps.build-comment.outputs.comment-id }}, owner: owner, repo: context.repo.repo, - body: `✅ Preview build completed!\n\nDocker image: \`${images[0]}\`` + body: `✅ Preview build completed!\n\nDocker image: \`ghcr.io/${owner}/romm-testing:${tag}\`` })