www-jmbit-de/.woodpecker.yml

38 lines
938 B
YAML
Raw Normal View History

2023-08-03 11:13:56 +02:00
# 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
2023-08-03 15:22:35 +02:00
- &repo git.jmbit.de/${CI_REPO_OWNER}/${CI_REPO_NAME}
2023-08-03 11:13:56 +02:00
steps:
dryrun:
2023-08-03 15:08:10 +02:00
image: git.jmbit.de/jmb/docker-hugo
2023-08-03 11:13:56 +02:00
commands:
- hugo --minify
when:
event: [ pull-request, push]
publish:
image: woodpeckerci/plugin-docker-buildx
settings:
dockerfile: *file
2023-08-03 15:08:10 +02:00
platforms: linux/arm/v7,linux/arm64/v8,linux/amd64,linux/ppc64le
2023-08-03 11:13:56 +02:00
repo: *repo
2023-08-03 15:08:10 +02:00
registry: git.jmbit.de
tags: latest
username: ${CI_REPO_OWNER}
2023-08-03 11:13:56 +02:00
password:
2023-08-03 15:08:10 +02:00
from_secret: forgejo_token
2023-08-03 11:13:56 +02:00
when:
event: push