drone: add codeberg package url

This commit is contained in:
WeebDataHoarder
2025-04-23 07:24:08 +02:00
parent 5189dd41f9
commit a4bbe474db
2 changed files with 87 additions and 11 deletions

View File

@@ -52,10 +52,10 @@ local Build(go, alpine, os, arch) = {
] ]
}; };
local Publish(go, alpine, os, arch, trigger, platforms, extra) = { local Publish(registry, repo, secret, go, alpine, os, arch, trigger, platforms, extra) = {
kind: "pipeline", kind: "pipeline",
type: "docker", type: "docker",
name: "publish-" + go + "-alpine" + alpine, name: "publish-" + go + "-alpine" + alpine + "-" + secret,
platform: { platform: {
os: os, os: os,
arch: arch, arch: arch,
@@ -70,8 +70,8 @@ local Publish(go, alpine, os, arch, trigger, platforms, extra) = {
DOCKER_BUILDKIT: "1" DOCKER_BUILDKIT: "1"
}, },
settings: { settings: {
registry: "git.gammaspectra.live", registry: registry,
repo: "git.gammaspectra.live/git/go-away", repo: repo,
compress: true, compress: true,
platform: platforms, platform: platforms,
builder_driver: "docker-container", builder_driver: "docker-container",
@@ -81,10 +81,10 @@ local Publish(go, alpine, os, arch, trigger, platforms, extra) = {
}, },
auto_tag_suffix: "alpine" + alpine, auto_tag_suffix: "alpine" + alpine,
username: { username: {
from_secret: "git_username", from_secret: secret + "_username",
}, },
password: { password: {
from_secret: "git_password", from_secret: secret + "_password",
}, },
} + extra, } + extra,
}, },
@@ -99,8 +99,10 @@ local containerArchitectures = ["linux/amd64", "linux/arm64", "linux/riscv64"];
Build("1.24", "3.21", "linux", "arm64"), Build("1.24", "3.21", "linux", "arm64"),
# latest # latest
Publish("1.24", "3.21", "linux", "amd64", {event: ["push"], branch: ["master"], }, containerArchitectures, {tags: ["latest"],}) + {name: "publish-latest"}, Publish("git.gammaspectra.live", "git.gammaspectra.live/git/go-away", "git", "1.24", "3.21", "linux", "amd64", {event: ["push"], branch: ["master"], }, containerArchitectures, {tags: ["latest"],}) + {name: "publish-latest-git"},
Publish("codeberg.org", "codeberg.org/weebdatahoarder/go-away", "codeberg", "1.24", "3.21", "linux", "amd64", {event: ["push"], branch: ["master"], }, containerArchitectures, {tags: ["latest"],}) + {name: "publish-latest-codeberg"},
# modern # modern
Publish("1.24", "3.21", "linux", "amd64", {event: ["promote", "tag"], target: ["production"], }, containerArchitectures, {auto_tag: true,}), Publish("git.gammaspectra.live", "git.gammaspectra.live/git/go-away", "git", "1.24", "3.21", "linux", "amd64", {event: ["promote", "tag"], target: ["production"], }, containerArchitectures, {auto_tag: true,}),
Publish("codeberg.org", "codeberg.org/weebdatahoarder/go-away", "codeberg", "1.24", "3.21", "linux", "amd64", {event: ["promote", "tag"], target: ["production"], }, containerArchitectures, {auto_tag: true,}),
] ]

View File

@@ -82,7 +82,7 @@ steps:
type: docker type: docker
--- ---
kind: pipeline kind: pipeline
name: publish-latest name: publish-latest-git
platform: platform:
arch: amd64 arch: amd64
os: linux os: linux
@@ -119,7 +119,44 @@ trigger:
type: docker type: docker
--- ---
kind: pipeline kind: pipeline
name: publish-1.24-alpine3.21 name: publish-latest-codeberg
platform:
arch: amd64
os: linux
steps:
- environment:
DOCKER_BUILDKIT: "1"
image: plugins/buildx
name: docker
privileged: true
settings:
auto_tag_suffix: alpine3.21
build_args:
from: alpine:3.21
from_builder: golang:1.24-alpine3.21
builder_driver: docker-container
compress: true
password:
from_secret: codeberg_password
platform:
- linux/amd64
- linux/arm64
- linux/riscv64
registry: codeberg.org
repo: codeberg.org/weebdatahoarder/go-away
tags:
- latest
username:
from_secret: codeberg_username
trigger:
branch:
- master
event:
- push
type: docker
---
kind: pipeline
name: publish-1.24-alpine3.21-git
platform: platform:
arch: amd64 arch: amd64
os: linux os: linux
@@ -155,7 +192,44 @@ trigger:
- production - production
type: docker type: docker
--- ---
kind: pipeline
name: publish-1.24-alpine3.21-codeberg
platform:
arch: amd64
os: linux
steps:
- environment:
DOCKER_BUILDKIT: "1"
image: plugins/buildx
name: docker
privileged: true
settings:
auto_tag: true
auto_tag_suffix: alpine3.21
build_args:
from: alpine:3.21
from_builder: golang:1.24-alpine3.21
builder_driver: docker-container
compress: true
password:
from_secret: codeberg_password
platform:
- linux/amd64
- linux/arm64
- linux/riscv64
registry: codeberg.org
repo: codeberg.org/weebdatahoarder/go-away
username:
from_secret: codeberg_username
trigger:
event:
- promote
- tag
target:
- production
type: docker
---
kind: signature kind: signature
hmac: 1b7c264865c2cf283d10a02ef6a9e19920f0a81010dec37a92300a7e59e57348 hmac: 6df9c42b8cc689f661dc3612f39f5ffce2dea2f50a92e45355fed1d882ee8c5a
... ...