Add semver tagging using docker-dind
Some checks failed
ci/woodpecker/tag/build/2 Pipeline was successful
ci/woodpecker/tag/build/1 Pipeline was successful
ci/woodpecker/tag/tag Pipeline failed
ci/woodpecker/push/build/2 Pipeline was successful
ci/woodpecker/push/build/1 Pipeline was successful
ci/woodpecker/push/tag Pipeline was successful

This commit is contained in:
Vladimir Hodakov 2025-01-14 03:45:07 +04:00
parent ae2439998d
commit 35a02be21c
Signed by: Vladimir Hodakov
GPG Key ID: 673980B6882F82C6

View File

@ -6,7 +6,7 @@ depends_on:
- build
steps:
tag:
tag latest:
image: docker:27-dind
environment:
CI_USER_PASSWORD:
@ -19,3 +19,28 @@ steps:
- docker manifest push source.hodakov.me/hdkv/phpbb:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: push
tag semver:
image: docker:27-dind
environment:
CI_USER_PASSWORD:
from_secret: registry_token
commands:
- set -eu
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
- source ./scripts/semver.sh
- echo "Creating manifest for $${DOCKER_EXACT_TAG}, $${DOCKER_MAJOR_TAG} and $${DOCKER_MINOR_TAG}"
- docker pull source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-amd64
- docker pull source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest create source.hodakov.me/hdkv/phpbb:$${DOCKER_EXACT_TAG} source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest create source.hodakov.me/hdkv/phpbb:$${DOCKER_MINOR_TAG} source.hodakov.me/hdkv/phpbb:$${DOCKER_EXACT_TAG}
- docker manifest create source.hodakov.me/hdkv/phpbb:$${DOCKER_MAJOR_TAG} source.hodakov.me/hdkv/phpbb:$${DOCKER_EXACT_TAG}
- docker manifest push source.hodakov.me/hdkv/phpbb:$${DOCKER_EXACT_TAG}
- docker manifest push source.hodakov.me/hdkv/phpbb:$${DOCKER_MINOR_TAG}
- docker manifest push source.hodakov.me/hdkv/phpbb:$${DOCKER_MAJOR_TAG}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: tag