2022-10-31 17:39:19 +00:00
|
|
|
pipeline:
|
|
|
|
|
2023-01-29 20:16:04 +00:00
|
|
|
docker:
|
2023-01-30 22:03:18 +00:00
|
|
|
image: woodpeckerci/plugin-docker-buildx
|
2022-10-31 17:39:19 +00:00
|
|
|
settings:
|
|
|
|
registry: gitea.massivebox.net
|
|
|
|
repo: gitea.massivebox.net/massivebox/ecodash
|
2023-01-30 22:03:18 +00:00
|
|
|
platforms: linux/amd64,linux/arm64
|
2022-10-31 17:39:19 +00:00
|
|
|
auto_tag: true
|
|
|
|
username: massivebox
|
|
|
|
password:
|
|
|
|
from_secret: auth_token
|
2023-05-01 18:21:36 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
2022-10-31 17:39:19 +00:00
|
|
|
|
2023-01-29 20:16:04 +00:00
|
|
|
build:
|
|
|
|
image: golang
|
|
|
|
commands:
|
2023-05-01 18:05:30 +00:00
|
|
|
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin
|
2023-05-01 18:34:50 +00:00
|
|
|
- go mod tidy
|
2023-05-01 18:05:30 +00:00
|
|
|
- golangci-lint run
|
2023-05-01 18:27:00 +00:00
|
|
|
- go build -o ecodash-x86 src/main/main.go
|
|
|
|
- env GOOS=linux GOARCH=arm go build -o ecodash-arm src/main/main.go
|
2023-01-29 20:16:04 +00:00
|
|
|
|
2022-11-07 15:23:19 +00:00
|
|
|
prepare-gitea-release:
|
|
|
|
image: alpine
|
|
|
|
commands:
|
|
|
|
- apk update; apk add zip
|
2023-01-29 20:16:04 +00:00
|
|
|
- mv ecodash-x86 ecodash; zip -r ecodash-x86.zip templates ecodash
|
|
|
|
- mv ecodash-arm ecodash; zip -r ecodash-arm.zip templates ecodash
|
2022-11-07 15:23:19 +00:00
|
|
|
when:
|
|
|
|
event: tag
|
|
|
|
|
2022-10-31 17:39:19 +00:00
|
|
|
gitea-publish:
|
|
|
|
image: plugins/gitea-release
|
|
|
|
settings:
|
|
|
|
base_url: https://gitea.massivebox.net
|
2023-01-30 22:03:18 +00:00
|
|
|
files:
|
|
|
|
- ecodash-x86.zip
|
|
|
|
- ecodash-arm.zip
|
2022-10-31 17:39:19 +00:00
|
|
|
api_key:
|
|
|
|
from_secret: auth_token
|
|
|
|
title: ${CI_COMMIT_TAG}
|
|
|
|
when:
|
|
|
|
event: tag
|