Try to build :latest using docker-dind
Some checks failed
ci/woodpecker/push/build/2 Pipeline failed
ci/woodpecker/push/build/1 Pipeline failed
ci/woodpecker/push/tag unknown status

This commit is contained in:
2025-01-14 02:32:01 +04:00
parent c3013e3944
commit 5aa1e4efcb
4 changed files with 135 additions and 40 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 build -t source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-${platform} .
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 build -t source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-${platform} .
- docker push source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-${platform}
volumes:
- /var/run/docker.sock:/var/run/docker.sock
when:
event: [push, tag]

View File

@@ -1,40 +0,0 @@
matrix:
platform:
- linux/amd64
- linux/arm64
labels:
platform: ${platform}
when:
branch: main
event: [push, pull_request, tag]
variables:
- &repo source.hodakov.me/${CI_REPO_OWNER}/phpbb
steps:
test-build:
image: woodpeckerci/plugin-docker-buildx:5.1.0
privileged: true
settings:
dockerfile: Dockerfile
dry_run: true
repo: *repo
auto_tag: true
when:
event: pull_request
publish:
image: woodpeckerci/plugin-docker-buildx:5.1.0
privileged: true
settings:
dockerfile: Dockerfile
repo: *repo
registry: source.hodakov.me
auto_tag: true
username: ${CI_REPO_OWNER}
password:
from_secret: registry_token
when:
event: [push, tag]

17
.woodpecker/tag.yaml Normal file
View File

@@ -0,0 +1,17 @@
when:
branch: main
event: [push, tag]
depends_on:
- build
steps:
tag:
image: docker:27-dind
commands:
- 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:latest source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-amd64 source.hodakov.me/hdkv/phpbb:${CI_COMMIT_SHA:0:10}-arm64
- docker manifest push source.hodakov.me/hdkv/phpbb:latest
volumes:
- /var/run/docker.sock:/var/run/docker.sock