Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit 013b519

Browse files
authored
Merge pull request #55 from stefanprodan/patch-1
Skipping docker push for external PRs
2 parents b5ec77e + 2d1b32b commit 013b519

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Makefile

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,12 @@ dockertravisbuild: build
6060
cp -rf bin docker/user/
6161
docker build -t $(NAME):$(TAG) -f docker/user/Dockerfile-release docker/user/
6262
docker build -t $(DBNAME):$(TAG) -f docker/user-db/Dockerfile docker/user-db/
63-
docker login -u $(DOCKER_USER) -p $(DOCKER_PASS)
64-
scripts/push.sh
65-
63+
if [ -z "$(DOCKER_PASS)" ]; then \
64+
echo "This is a build triggered by an external PR. Skipping docker push."; \
65+
else \
66+
docker login -u $(DOCKER_USER) -p $(DOCKER_PASS); \
67+
scripts/push.sh; \
68+
fi
6669

6770
mockservice:
6871
docker run -d --name user-mock -h user-mock -v $(PWD)/apispec/mock.json:/data/db.json clue/json-server

0 commit comments

Comments
 (0)