42 lines
1.0 KiB
YAML
42 lines
1.0 KiB
YAML
# Build and publish Docker images for multible architectures.
|
|
#
|
|
# Pushing an image to codeberg as container registry,
|
|
# package owner will be the repo owner.
|
|
#
|
|
# this config also shows usage of yaml aliases and
|
|
# was taken from https://codeberg.org/6543/docker-images/src/commit/37e29c227717c1c07d2776cddcf14725bf952875/.woodpecker/hello.yml
|
|
|
|
when:
|
|
branch: main
|
|
|
|
variables:
|
|
- &file Dockerfile
|
|
- &repo git.jmbit.de/${CI_REPO_OWNER}/docker-hugo
|
|
|
|
steps:
|
|
dryrun:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dockerfile: *file
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
dry_run: true
|
|
repo: *repo
|
|
tags: latest
|
|
when:
|
|
event: pull_request
|
|
|
|
publish:
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
settings:
|
|
dockerfile: *file
|
|
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
|
|
repo: *repo
|
|
registry: git.jmbit.de
|
|
tags: latest
|
|
username: ${CI_REPO_OWNER}
|
|
password:
|
|
from_secret: forgejo_token
|
|
when:
|
|
event: push
|
|
|