1

Initial commit

This commit is contained in:
2025-06-13 04:15:35 +04:00
commit 1c350b8dfb
14 changed files with 500 additions and 0 deletions

35
.woodpecker/build.yaml Normal file
View File

@@ -0,0 +1,35 @@
matrix:
platform:
- linux/amd64
- linux/arm64
labels:
platform: ${platform}
when:
branch: main
event: [push, pull_request, tag]
steps:
test-build:
image: docker:27-dind
commands:
- docker buildx build -t source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-${platform##linux/} .
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: pull_request
build-to-registry:
image: docker:27-dind
environment:
CI_USER_PASSWORD:
from_secret: registry_token
commands:
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
- docker buildx build -t source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-${platform##linux/} .
- docker push source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-${platform##linux/}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: [push, tag]

46
.woodpecker/tag.yaml Normal file
View File

@@ -0,0 +1,46 @@
when:
branch: main
event: [push, tag]
depends_on:
- build
steps:
tag latest:
image: docker:27-dind
environment:
CI_USER_PASSWORD:
from_secret: registry_token
commands:
- docker login -u ${CI_REPO_OWNER} -p $${CI_USER_PASSWORD} source.hodakov.me
- docker pull source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-amd64
- docker pull source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest create source.hodakov.me/hdkv/github-release:latest source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest push source.hodakov.me/hdkv/github-release: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/github-release:${CI_COMMIT_SHA:0:10}-amd64
- docker pull source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest create source.hodakov.me/hdkv/github-release:$${DOCKER_EXACT_TAG} source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest create source.hodakov.me/hdkv/github-release:$${DOCKER_MINOR_TAG} source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest create source.hodakov.me/hdkv/github-release:$${DOCKER_MAJOR_TAG} source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/hdkv/github-release:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest push source.hodakov.me/hdkv/github-release:$${DOCKER_EXACT_TAG}
- docker manifest push source.hodakov.me/hdkv/github-release:$${DOCKER_MINOR_TAG}
- docker manifest push source.hodakov.me/hdkv/github-release:$${DOCKER_MAJOR_TAG}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: tag