Merge branch 'master' of ssh://git.freifunk-rhein-sieg.net:2222/Freifunk-Troisdorf/ubnt-freifunk-map-api
This commit is contained in:
commit
631a5e398f
@ -1,53 +0,0 @@
|
|||||||
local pipeline(os, arch) = {
|
|
||||||
kind: "pipeline",
|
|
||||||
name: os + "/" + arch,
|
|
||||||
platform: {
|
|
||||||
"os": os,
|
|
||||||
"arch": arch,
|
|
||||||
},
|
|
||||||
steps: [{
|
|
||||||
name: "compile " + os + "/" + arch,
|
|
||||||
image: "golang:1.20.3-alpine3.17",
|
|
||||||
environment: {
|
|
||||||
"GOOS": os,
|
|
||||||
"GOARCH": arch,
|
|
||||||
"CGO_ENABLED": "0",
|
|
||||||
},
|
|
||||||
commands: [
|
|
||||||
'go build -ldflags "-s -w -X main.version=${DRONE_TAG##v}" -trimpath -o release/' + os + "/" + arch + "/ubnt-freifunk-map-api .",
|
|
||||||
"tar -cvzf release/ubnt-freifunk-map-api_"+ os + "-" + arch + ".tar.gz -C release/" + os + "/" + arch + " ubnt-freifunk-map-api"
|
|
||||||
],
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "gitea_release " + os + "/" + arch,
|
|
||||||
image: "plugins/gitea-release",
|
|
||||||
settings: {
|
|
||||||
api_key: { "from_secret": "gitea_api_key" },
|
|
||||||
base_url: "https://git.freifunk-rhein-sieg.net",
|
|
||||||
files: "release/*.tar.gz"
|
|
||||||
},
|
|
||||||
when: {
|
|
||||||
event: "tag"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "upload to gitea container registry",
|
|
||||||
image: "plugins/docker:latest",
|
|
||||||
settings: {
|
|
||||||
repo: "git.freifunk-rhein-sieg.net/freifunk-troisdorf/ubnt-freifunk-map-api",
|
|
||||||
registry: "git.freifunk-rhein-sieg.net",
|
|
||||||
username: { "from_secret": "docker_username" },
|
|
||||||
password: { "from_secret": "docker_password" },
|
|
||||||
tags: ["latest"],
|
|
||||||
auto_tag: true,
|
|
||||||
},
|
|
||||||
when: {
|
|
||||||
event: "tag"
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
|
|
||||||
[
|
|
||||||
pipeline("linux", "amd64")
|
|
||||||
]
|
|
Loading…
Reference in New Issue
Block a user