Skip to content

Commit 18521e4

Browse files
committed
Fix Docker Hub push
1 parent 85c1348 commit 18521e4

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

.gitlab-ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ Push Docker latest:
9393
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
9494
# Then we tag it "latest"
9595
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:latest
96+
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA programie/phpdyndns:latest
9697
# Annnd we push it.
9798
- docker push $CI_REGISTRY_IMAGE:latest
99+
- echo -n $DOCKER_HUB_TOKEN | docker login -u programie --password-stdin
100+
- docker push programie/phpdyndns:latest
98101

99102
# Finally, the goal here is to Docker tag any Git tag
100103
# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome
@@ -110,7 +113,7 @@ Push Docker tag:
110113
script:
111114
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
112115
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
116+
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA programie/phpdyndns:$CI_COMMIT_REF_NAME
113117
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
114-
- docker login -u ${DOCKER_HUB_ID}
115-
- echo -n $DOCKER_HUB_TOKEN | docker login -u programie --password-stdin $DOCKER_HUB_TOKEN
118+
- echo -n $DOCKER_HUB_TOKEN | docker login -u programie --password-stdin
116119
- docker push programie/phpdyndns:$CI_COMMIT_REF_NAME

0 commit comments

Comments
 (0)