Skip to content

🐍 Geometric Computer Vision Library for Spatial AI

[Fix] Fixes circleci ref name merge (#800)

Edgar Riba2e4c51fddd93
diff --git a/.circleci/config.yml b/.circleci/config.yml
index 33b48c02f..4a4d98845 100644
--- a/.circleci/config.yml
+++ b/.circleci/config.yml
@@ -21,8 +21,15 @@ references:
name: Build and push Docker image
command: |
gcloud --quiet auth configure-docker
- cd docker/tpu-tests
- docker build --tag "$GCR_IMAGE_PATH:$CIRCLE_WORKFLOW_JOB_ID" -f Dockerfile --build-arg "PYTHON_VERSION=$PYTHON_VER" --build-arg "PYTORCH_VERSION=$PYTORCH_VER" --build-arg "GITHUB_REF=pull/$CIRCLE_PR_NUMBER/head" .
+ cd docker/tpu-tests
+ # Update PR refs for testing.
+ if [[ -n "${CIRCLE_PR_NUMBER}" ]]
+ then
+ FETCH_REF="pull/$CIRCLE_PR_NUMBER/head"
+ else
+ FETCH_REF="refs/heads/master"
+ fi
+ docker build --tag "$GCR_IMAGE_PATH:$CIRCLE_WORKFLOW_JOB_ID" -f Dockerfile --build-arg "PYTHON_VERSION=$PYTHON_VER" --build-arg "PYTORCH_VERSION=$PYTORCH_VER" --build-arg "GITHUB_REF=$FETCH_REF" .
docker push "$GCR_IMAGE_PATH:$CIRCLE_WORKFLOW_JOB_ID"
deploy_cluster: &deploy_cluster