From e40bb9f8bfb12e82d5b606aaca695dca43a5f321 Mon Sep 17 00:00:00 2001 From: Ganeshkumar Ashokavardhanan Date: Mon, 17 Aug 2026 13:25:24 -0700 Subject: [PATCH] fix(ci): make test build work on pull requests from forks ci.yaml tags the test image with ${{ secrets.AZURE_REGISTRY_SERVER }}. Secrets are not exposed to `pull_request` workflows triggered from a fork, so on those runs the expression resolves to an empty string and the tag becomes `/public/aks/:`, which buildx rejects: ERROR: failed to build: invalid tag "/public/aks/aks-gpu-cuda:595.71.05-...": invalid reference format Every build job then fails within seconds, so pull requests from forks get no build signal at all and the red checks are indistinguishable from a genuine breakage. Fall back to a placeholder registry when the secret is unavailable. ci.yaml only builds images -- it never runs azure/login, az acr login, or docker push (verified: zero occurrences of each) -- so the registry portion of the tag is not meaningful here. It only has to be a syntactically valid reference for buildx to accept. Runs that do have the secret are unaffected and keep tagging exactly as before, since `||` returns the first truthy operand. Rebased onto main so the fallback lives in the `env:` blocks introduced by the workflow expression-injection fix (d97b02b), rather than inline in the `docker buildx build` arguments. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: e525ff6d-7072-4f71-92b9-4d5a87808b20 --- .github/workflows/ci.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 405fe1a..334cbc2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -71,7 +71,7 @@ jobs: env: DRIVER_VERSION: ${{ steps.load_config.outputs.cuda_version }} IMAGE_REPO: ${{ matrix.image_repo }} - REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER }} + REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER || 'localhost:5000' }} VERSION: ${{ steps.semver.outputs.version }} run: | set -x @@ -137,7 +137,7 @@ jobs: env: DRIVER_VERSION: ${{ steps.load_config.outputs.cuda_version }} IMAGE_REPO: ${{ matrix.image_repo }} - REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER }} + REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER || 'localhost:5000' }} VERSION: ${{ steps.semver.outputs.version }} run: | set -x @@ -211,7 +211,7 @@ jobs: DRIVER_URL: ${{ steps.load_config.outputs.grid_url }} DRIVER_VERSION: ${{ steps.load_config.outputs.grid_version }} IMAGE_REPO: ${{ matrix.image_repo }} - REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER }} + REGISTRY_SERVER: ${{ secrets.AZURE_REGISTRY_SERVER || 'localhost:5000' }} VERSION: ${{ steps.semver.outputs.version }} run: | set -x