www-jmbit-de/.woodpecker.yml

38 lines
810 B
YAML
Raw Normal View History

2023-08-03 11:13:56 +02:00
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:
hugo:
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]
webserver:
image: golang:alpine
commands:
- go mod download && go mod verify
- CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -buildvcs=true -o app .
when:
event: [ pull-request, push]
2023-08-03 11:13:56 +02:00
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