www-jmbit-de/.woodpecker.yml

38 lines
810 B
YAML

when:
branch: main
variables:
- &file Dockerfile
- &repo git.jmbit.de/${CI_REPO_OWNER}/${CI_REPO_NAME}
steps:
hugo:
image: git.jmbit.de/jmb/docker-hugo
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]
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