Skip to content

Fix GHCR manifest probe in CI docker-existence gate - #1

Merged
MarcelRB merged 2 commits into
mainfrom
copilot/fix-check-docker-image-job
Oct 9, 2026
Merged

MarcelRB merged 2 commits into
mainfrom
copilot/fix-check-docker-image-job

Conversation

Copilot AI commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

The workflow job “Check if the docker image already exists” was failing before tests/build decisions due to an invalid GHCR manifest request/auth flow. This change stabilizes that gate so missing images are treated as a condition, not a job failure.

  • Auth header construction

    • Build GHCR Basic auth from github.actor:GITHUB_TOKEN with newline-safe base64 encoding.
    • Replace placeholder header usage with an actual Authorization: Basic ... header.
  • Manifest probe hardening

    • Make the manifest request non-fatal (|| true) so absent tags/images do not crash the job.
    • Parse mediaType from the first manifest response instead of issuing a second request.
  • Scope

    • Changes are isolated to .github/workflows/run-tests-update-docker-on-demand.yml in the check-if-docker-image-exists step.
GHCR_TOKEN=$(printf "%s" "${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}" | base64 | tr -d '\n')
manifest=$(curl -sS -H "Authorization: Basic $GHCR_TOKEN" \
  https://${{ env.REGISTRY }}/v2/${{ steps.string.outputs.lowercase }}/manifests/${{ needs.get-docker-meta-data.outputs.version }} || true)
filtered_manifest=$(echo "$manifest" | jq '.mediaType')

Co-authored-by: MarcelRB <56345142+MarcelRB@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix failing GitHub Actions job for checking docker image existence Fix GHCR manifest probe in CI docker-existence gate Oct 9, 2026
Copilot AI requested a review from MarcelRB October 9, 2026 12:23
@MarcelRB
MarcelRB marked this pull request as ready for review October 9, 2026 12:25
@MarcelRB
MarcelRB merged commit 221410f into main Oct 9, 2026
4 of 5 checks passed
@MarcelRB
MarcelRB deleted the copilot/fix-check-docker-image-job branch October 9, 2026 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants