ecodash/.woodpecker.yml
Daniil Gentili d95197ede3
Some checks are pending
ci/woodpecker/pr/woodpecker Pipeline is pending
Filter
2023-05-01 20:21:36 +02:00

45 lines
1.1 KiB
YAML

pipeline:
docker:
image: woodpeckerci/plugin-docker-buildx
settings:
registry: gitea.massivebox.net
repo: gitea.massivebox.net/massivebox/ecodash
platforms: linux/amd64,linux/arm64
auto_tag: true
username: massivebox
password:
from_secret: auth_token
when:
event: tag
build:
image: golang
commands:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
- golangci-lint run
- go build -o ecodash-x86
- env GOOS=linux GOARCH=arm go build -o ecodash-arm
prepare-gitea-release:
image: alpine
commands:
- apk update; apk add zip
- mv ecodash-x86 ecodash; zip -r ecodash-x86.zip templates ecodash
- mv ecodash-arm ecodash; zip -r ecodash-arm.zip templates ecodash
when:
event: tag
gitea-publish:
image: plugins/gitea-release
settings:
base_url: https://gitea.massivebox.net
files:
- ecodash-x86.zip
- ecodash-arm.zip
api_key:
from_secret: auth_token
title: ${CI_COMMIT_TAG}
when:
event: tag