2023-08-03 13:22:24 +02:00
|
|
|
# Build and publish Docker images for multible architectures.
|
|
|
|
|
|
|
|
when:
|
|
|
|
branch: main
|
|
|
|
|
|
|
|
variables:
|
|
|
|
- &file Dockerfile
|
|
|
|
- &repo git.jmbit.de/jmbit/docker-hugo
|
|
|
|
|
|
|
|
steps:
|
2023-08-03 14:09:20 +02:00
|
|
|
dryrun:
|
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
|
|
settings:
|
|
|
|
dockerfile: *file
|
2023-08-03 14:46:40 +02:00
|
|
|
platforms: linux/arm64/v8,linux/amd64
|
2023-08-03 14:09:20 +02:00
|
|
|
dry_run: true
|
|
|
|
repo: *repo
|
|
|
|
tags: latest
|
|
|
|
when:
|
|
|
|
event: pull_request
|
|
|
|
path: *file
|
2023-08-03 13:22:24 +02:00
|
|
|
publish:
|
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
|
|
|
settings:
|
|
|
|
dockerfile: *file
|
|
|
|
platforms: linux/arm64/v8,linux/amd64
|
|
|
|
repo: *repo
|
|
|
|
registry: git.jmbit.de
|
|
|
|
tags:
|
|
|
|
- latest
|
|
|
|
- ${CI_COMMIT_SHA}
|
|
|
|
username: jmbitci
|
|
|
|
password:
|
|
|
|
from_secret: dockerhub_token
|
|
|
|
when:
|
|
|
|
event: push
|
2023-08-03 14:09:20 +02:00
|
|
|
path: *file
|
|
|
|
|
2023-08-03 13:22:24 +02:00
|
|
|
|