2024-01-12 22:13:24 +01:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
|
|
|
- event: tag
|
|
|
|
- event: push
|
|
|
|
branch:
|
2024-01-12 22:29:31 +01:00
|
|
|
- ${CI_REPO_DEFAULT_BRANCH}
|
2024-01-12 22:13:24 +01:00
|
|
|
- renovate/*
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- &platforms 'linux/amd64,linux/arm64,linux/s390x'
|
|
|
|
# vars used on push / tag events only
|
|
|
|
- publish_logins: &publish_logins
|
|
|
|
# Default DockerHub login
|
|
|
|
- registry: https://index.docker.io/v1/
|
2024-01-20 13:26:30 +01:00
|
|
|
username: woodpeckerbot
|
2024-01-12 22:13:24 +01:00
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
|
|
|
# Additional Quay.IO login
|
|
|
|
- registry: https://quay.io
|
2024-01-20 13:26:30 +01:00
|
|
|
username: 'woodpeckerci+wp_ci'
|
2024-01-12 22:13:24 +01:00
|
|
|
password:
|
|
|
|
from_secret: QUAY_IO_TOKEN
|
|
|
|
- &publish_repos 'docker.io/woodpeckerci/plugin-kaniko,quay.io/woodpeckerci/plugin-kaniko'
|
|
|
|
|
|
|
|
steps:
|
|
|
|
lint:
|
2024-05-22 22:02:08 +02:00
|
|
|
image: alpine:3.20
|
2024-01-12 22:13:24 +01:00
|
|
|
commands:
|
|
|
|
- apk add -U shellcheck
|
2024-01-12 22:22:45 +01:00
|
|
|
- shellcheck -e SC3040 -e SC3010 -e SC3037 -e SC3020 -e SC2162 *.sh
|
2024-01-12 22:26:48 +01:00
|
|
|
when:
|
|
|
|
- event: pull_request
|
|
|
|
- event: push
|
|
|
|
branch: renovate/*
|
2024-01-12 22:13:24 +01:00
|
|
|
|
|
|
|
# TODO: add test of fresh build kaniko
|
|
|
|
|
|
|
|
build-dryrun:
|
2024-01-22 08:19:36 +01:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:3.0.0
|
2024-01-12 22:13:24 +01:00
|
|
|
depends_on:
|
|
|
|
- lint
|
|
|
|
settings:
|
|
|
|
repo: test/repo
|
|
|
|
dry_run: true
|
|
|
|
platforms: *platforms
|
|
|
|
tags: latest
|
|
|
|
when:
|
|
|
|
- event: pull_request
|
|
|
|
- event: push
|
|
|
|
branch: renovate/*
|
|
|
|
|
|
|
|
release-next:
|
2024-01-22 08:19:36 +01:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:3.0.0
|
2024-01-12 22:13:24 +01:00
|
|
|
settings:
|
|
|
|
repo: *publish_repos
|
|
|
|
platforms: *platforms
|
|
|
|
tags: next
|
|
|
|
logins: *publish_logins
|
|
|
|
when:
|
2024-01-12 22:29:31 +01:00
|
|
|
branch: ${CI_REPO_DEFAULT_BRANCH}
|
2024-01-12 22:13:24 +01:00
|
|
|
event: push
|
|
|
|
|
|
|
|
release-tag:
|
2024-01-22 08:19:36 +01:00
|
|
|
image: woodpeckerci/plugin-docker-buildx:3.0.0
|
2024-01-12 22:13:24 +01:00
|
|
|
settings:
|
|
|
|
repo: *publish_repos
|
|
|
|
platforms: *platforms
|
|
|
|
auto_tag: true
|
|
|
|
# remove line below if you can read it on a release branch and it's not the latest release branch
|
|
|
|
tags: latest
|
|
|
|
logins: *publish_logins
|
|
|
|
when:
|
|
|
|
event: tag
|