33b6eb4faa
- use golang v1.20 - use buildx v0.10.4 (to have buildkit v0.11.2) Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/58 Reviewed-by: Lauris BH <lafriks@noreply.codeberg.org> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
51 lines
1.2 KiB
YAML
51 lines
1.2 KiB
YAML
variables:
|
|
- &platforms 'linux/amd64,linux/arm64'
|
|
- &golang 'golang:1.20'
|
|
- &build_plugin 'woodpeckerci/plugin-docker-buildx:2'
|
|
|
|
pipeline:
|
|
vendor:
|
|
image: *golang
|
|
commands: go mod vendor
|
|
|
|
test:
|
|
image: *golang
|
|
commands: go test -cover ./...
|
|
|
|
publish-dryrun:
|
|
image: *build_plugin
|
|
pull: true
|
|
settings:
|
|
platforms: *platforms
|
|
repo: woodpeckerci/plugin-docker-buildx
|
|
dockerfile: Dockerfile.multiarch
|
|
dry_run: true
|
|
when:
|
|
event: pull_request
|
|
branch: main
|
|
|
|
publish:
|
|
image: *build_plugin
|
|
settings:
|
|
platforms: *platforms
|
|
repo: woodpeckerci/plugin-docker-buildx,codeberg.org/woodpecker-plugins/docker-buildx
|
|
auto_tag: true
|
|
dockerfile: Dockerfile.multiarch
|
|
logins:
|
|
# Default DockerHub login
|
|
- registry: https://index.docker.io/v1/
|
|
username:
|
|
from_secret: docker_username
|
|
password:
|
|
from_secret: docker_password
|
|
# Additional Codeberg login
|
|
- registry: https://codeberg.org
|
|
username:
|
|
from_secret: cb_username
|
|
password:
|
|
from_secret: cb_password
|
|
|
|
when:
|
|
event: [push, tag, cron]
|
|
branch: main
|