From 0a4b3dfa1eb146901e5e3a0b21cd817c770f08cd Mon Sep 17 00:00:00 2001 From: Ganeshkumar Ashokavardhanan Date: Wed, 29 Jul 2026 14:34:20 -0700 Subject: [PATCH] fix(ci): make test build work on pull requests from forks The CI test build tags the 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-grid:...": invalid reference format Every 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. This workflow only builds images, it never logs in to a registry and never pushes, 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. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 8cd619fe-2501-4bcc-97ea-4a895088ffc2 --- .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 172f20a..3537ad8 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -63,7 +63,7 @@ jobs: set -x echo "tag is: " echo ${{ steps.semver.outputs.version }} - docker buildx build --platform linux/arm64/v8,linux/amd64 --build-arg DRIVER_KIND=cuda --build-arg DRIVER_VERSION=${{ steps.load_config.outputs.cuda_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/${{ matrix.image_repo }}:${{ steps.semver.outputs.version }} . + docker buildx build --platform linux/arm64/v8,linux/amd64 --build-arg DRIVER_KIND=cuda --build-arg DRIVER_VERSION=${{ steps.load_config.outputs.cuda_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER || 'localhost:5000' }}/public/aks/${{ matrix.image_repo }}:${{ steps.semver.outputs.version }} . docker images - name: Move cache run: | @@ -114,7 +114,7 @@ jobs: set -x echo "tag is: " echo ${{ steps.semver.outputs.version }} - docker buildx build --build-arg DRIVER_KIND=cuda --build-arg DRIVER_VERSION=${{ steps.load_config.outputs.cuda_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/${{ matrix.image_repo }}:${{ steps.semver.outputs.version }} . + docker buildx build --build-arg DRIVER_KIND=cuda --build-arg DRIVER_VERSION=${{ steps.load_config.outputs.cuda_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER || 'localhost:5000' }}/public/aks/${{ matrix.image_repo }}:${{ steps.semver.outputs.version }} . docker images - name: Move cache run: | @@ -168,7 +168,7 @@ jobs: set -x echo "tag is: " echo ${{ steps.semver.outputs.version }} - docker buildx build --build-arg DRIVER_URL=${{ steps.load_config.outputs.grid_url }} --build-arg DRIVER_KIND=grid --build-arg DRIVER_VERSION=${{ steps.load_config.outputs.grid_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER }}/public/aks/${{ matrix.image_repo }}:${{ steps.semver.outputs.version }} . + docker buildx build --build-arg DRIVER_URL=${{ steps.load_config.outputs.grid_url }} --build-arg DRIVER_KIND=grid --build-arg DRIVER_VERSION=${{ steps.load_config.outputs.grid_version }} --cache-from=type=local,src=/tmp/.buildx-cache --cache-to=type=local,dest=/tmp/.buildx-cache-new --output=type=docker -t ${{ secrets.AZURE_REGISTRY_SERVER || 'localhost:5000' }}/public/aks/${{ matrix.image_repo }}:${{ steps.semver.outputs.version }} . docker images - name: Move cache run: |