CI: add test (#26)
Reviewed-on: https://codeberg.org/woodpecker-plugins/plugin-docker-buildx/pulls/26 Reviewed-by: anbraten <anbraten@noreply.codeberg.org> Co-authored-by: 6543 <6543@obermui.de> Co-committed-by: 6543 <6543@obermui.de>
This commit is contained in:
39
.woodpecker.yml
Normal file
39
.woodpecker.yml
Normal file
@@ -0,0 +1,39 @@
|
||||
branches: main
|
||||
|
||||
variables:
|
||||
- &platforms 'linux/amd64,linux/arm64'
|
||||
- &golang 'golang:1.18'
|
||||
|
||||
pipeline:
|
||||
vendor:
|
||||
image: *golang
|
||||
commands: go mod vendor
|
||||
|
||||
test:
|
||||
image: *golang
|
||||
commands: go test -cover ./...
|
||||
|
||||
publish-dryrun:
|
||||
image: woodpeckerci/plugin-docker-buildx:v20.10.18
|
||||
settings:
|
||||
platforms: *platforms
|
||||
repo: woodpeckerci/plugin-docker-buildx
|
||||
dockerfile: Dockerfile.multiarch
|
||||
dry_run: true
|
||||
when:
|
||||
event: pull_request
|
||||
|
||||
publish:
|
||||
image: woodpeckerci/plugin-docker-buildx:v20.10.18
|
||||
settings:
|
||||
platforms: *platforms
|
||||
repo: woodpeckerci/plugin-docker-buildx
|
||||
auto_tag: true
|
||||
dockerfile: Dockerfile.multiarch
|
||||
username:
|
||||
from_secret: docker_username
|
||||
password:
|
||||
from_secret: docker_password
|
||||
when:
|
||||
event: [push, tag, cron]
|
||||
branch: main
|
||||
Reference in New Issue
Block a user