Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bcsherma committed Jan 16, 2024
1 parent 29dbe18 commit eebb348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@ jobs:
- run:
name: Check for Changes in Subdirectory
command: |
if git diff --name-only origin/<< .CIRCLE_BRANCH >>...HEAD | grep '<< parameters.subdir >>'; then
if git diff --name-only origin/$CIRCLE_BRANCH...HEAD | grep '<< parameters.subdir >>'; then
echo "Changes detected in << parameters.subdir >>, building Docker image."
echo $DOCKERHUB_TOKEN | docker login --username davidwandb --password-stdin
docker buildx create --platform linux/amd64,linux/arm64 --use
cd << parameters.subdir >>
image_name=$(echo "<< parameters.subdir >>" | sed 's/jobs\//job_/g; s/\//_/g')
echo "$DOCKER_PASS" | docker login -u "$DOCKER_USER" --password-stdin
docker push wandb/$image_name:<< .CIRCLE_BRANCH >>
docker push wandb/$image_name:$CIRCLE_BRANCH
else
echo "No changes in << parameters.subdir >>, skipping build."
fi
Expand Down

0 comments on commit eebb348

Please sign in to comment.