Skip to content

Commit 42218eb

Browse files
authored
infra: skip image push in PR build if no changes (#350)
1 parent 870fc33 commit 42218eb

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

buildspec.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ phases:
8181

8282
# push images to ecr
8383
- $(aws ecr get-login --registry-ids $ACCOUNT --no-include-email --region $AWS_DEFAULT_REGION)
84-
- docker push $PREPROD_IMAGE:$CPU_TAG_PY2
84+
- push_cmd="docker push $PREPROD_IMAGE:$CPU_TAG_PY2"
8585
- execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
86-
- docker push $PREPROD_IMAGE:$GPU_TAG_PY2
86+
- push_cmd="docker push $PREPROD_IMAGE:$GPU_TAG_PY2"
8787
- execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
88-
- docker push $PREPROD_IMAGE:$CPU_TAG_PY3
88+
- push_cmd="docker push $PREPROD_IMAGE:$CPU_TAG_PY3"
8989
- execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
90-
- docker push $PREPROD_IMAGE:$GPU_TAG_PY3
90+
- push_cmd="docker push $PREPROD_IMAGE:$GPU_TAG_PY3"
9191
- execute-command-if-has-matching-changes "$push_cmd" "test/" "docker/*" "buildspec.yml"
9292

9393
# launch remote gpu instance

0 commit comments

Comments
 (0)