docker-buildx/.woodpecker.yml
2024-02-14 18:21:30 +01:00

79 lines
1.7 KiB
YAML

# when:
# - event: [pull_request, tag, cron]
# - event: push
# branch:
# - ${CI_REPO_DEFAULT_BRANCH}
# - renovate/*
variables:
- &golang "golang:1.22"
- &build_plugin "woodpeckerci/plugin-docker-buildx:3.0.1"
- base_settings: &base_buildx_settings
platforms: "linux/amd64,linux/arm64"
dockerfile: Dockerfile.multiarch
auto_tag: true
repo: gitnet.fr/deblan/docker-buildx
- &login_setting
- registry: https://gitnet.fr
username:
from_secret: registry_user
password:
from_secret: registry_password
steps:
foo:
image: gitnet.fr/deblan/docker-buildx
volumes:
- /var/run/docker.sock:/var/run/docker.sock
settings:
<<: *base_buildx_settings
dry-run: true
secrets:
- foo
- bar
vendor:
image: *golang
commands: go mod vendor
test:
image: *golang
depends_on: vendor
commands: go test -cover ./...
lint-editorconfig:
image: docker.io/mstruebing/editorconfig-checker:2.7.2
when:
event: push
lint-format:
image: *golang
depends_on: vendor
commands: make formatcheck
when:
event: push
publish-dryrun:
image: *build_plugin
depends_on: test
pull: true
settings:
<<: *base_buildx_settings
repo: test
dry-run: true
when:
evaluate: 'not (CI_COMMIT_PULL_REQUEST_LABELS contains "build_pr_images")'
event: pull_request
branch:
- ${CI_REPO_DEFAULT_BRANCH}
- renovate/*
publish:
image: *build_plugin
depends_on: test
settings:
<<: *base_buildx_settings
logins: *login_setting
when:
event: [push, tag, cron]