CI: add versioned docker images
This commit is contained in:
parent
7bcd3892b7
commit
9c22170aef
@ -573,12 +573,16 @@ publish:docker:
|
||||
- zeronet-staging
|
||||
- mainnet-staging
|
||||
before_script:
|
||||
- apk add git
|
||||
- mkdir ~/.docker || true
|
||||
- echo "${CI_DOCKER_AUTH}" > ~/.docker/config.json
|
||||
script:
|
||||
- LAST_COMMIT_DATE_TIME=$(git log --pretty=format:"%cd" -1 --date="format:%Y%m%d%H%M%S" 2>&1)
|
||||
- ./scripts/create_docker_image.sh
|
||||
"${public_docker_image_name}" "${CI_COMMIT_REF_NAME}"
|
||||
- docker push "${public_docker_image_name}:${CI_COMMIT_REF_NAME}"
|
||||
- docker tag "${public_docker_image_name}:${CI_COMMIT_REF_NAME}" "${public_docker_image_name}:${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${LAST_COMMIT_DATE_TIME}"
|
||||
- docker push "${public_docker_image_name}:${CI_COMMIT_REF_NAME}_${CI_COMMIT_SHORT_SHA}_${LAST_COMMIT_DATE_TIME}"
|
||||
tags:
|
||||
- safe_docker
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user