Skip to content

Commit 3c42f02

Browse files
committed
Push docker tag prod-latest every time a prod date-based tag is pushed
1 parent 67e2f9e commit 3c42f02

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

docker/bin/push2dockerhub.sh

+4-5
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,11 @@ if [[ "$BRANCH_NAME" == "main" ]]; then
2323
docker push $FROM_DOCKER_REPOSITORY:latest
2424
fi
2525

26-
if [[ "$BRANCH_NAME" == "prod" ]]; then
27-
docker tag $IMG_TO_PUSH $FROM_DOCKER_REPOSITORY:prod-latest
28-
docker push $FROM_DOCKER_REPOSITORY:prod-latest
29-
fi
30-
3126
if [[ "$GIT_TAG_DATE_BASED" == true ]]; then
27+
# production tag
3228
docker tag $IMG_TO_PUSH $FROM_DOCKER_REPOSITORY:$GIT_TAG
3329
docker push $FROM_DOCKER_REPOSITORY:$GIT_TAG
30+
# used by services like sitemap-generator
31+
docker tag $IMG_TO_PUSH $FROM_DOCKER_REPOSITORY:prod-latest
32+
docker push $FROM_DOCKER_REPOSITORY:prod-latest
3433
fi

0 commit comments

Comments
 (0)