Skip to content

Commit

Permalink
Merge pull request #21 from reactioncommerce/docker-publish-update
Browse files Browse the repository at this point in the history
Add condition to not publish for forks
  • Loading branch information
impactmass authored Mar 8, 2018
2 parents 8f95ed1 + 0a820b5 commit 8abd2a5
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -87,11 +87,15 @@ jobs:
- run:
name: Docker Push
command: |
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
docker push "$DOCKER_REPOSITORY:$CIRCLE_SHA1"
cat docker-cache/docker-tags.txt \
| xargs -t -I % \
docker push "$DOCKER_REPOSITORY:%"
if [ -z "$CIRCLE_PR_USERNAME" ]; then \
docker login -u "$DOCKER_USER" -p "$DOCKER_PASS"
docker push "$DOCKER_REPOSITORY:$CIRCLE_SHA1"
cat docker-cache/docker-tags.txt \
| xargs -t -I % \
docker push "$DOCKER_REPOSITORY:%"
else
echo "No deploy for forks"
fi
test:
<<: *defaults
Expand Down

0 comments on commit 8abd2a5

Please sign in to comment.