Port CI to Forgejo Actions
All checks were successful
/ sbom (push) Has been skipped
/ build (darwin/arm64) (push) Successful in 1m24s
/ build (linux/amd64) (push) Successful in 1m38s
/ build (linux/arm64) (push) Successful in 1m31s
/ build (windows/amd64) (push) Successful in 1m35s
/ build (windows/arm64) (push) Successful in 1m42s
/ build (darwin/amd64) (push) Successful in 3m28s
/ build (push) Successful in 4m6s
/ docker (push) Successful in 0s
/ upload (push) Has been skipped
/ binaries (push) Successful in 0s

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Jonas Leder 2026-11-18 10:56:09 +01:00
commit ed3c25b815
2 changed files with 15 additions and 41 deletions

15
.forgejo/workflows/ci.yml Normal file
View file

@ -0,0 +1,15 @@
on:
push:
branches: ['**']
tags: ['**']
workflow_dispatch:
jobs:
binaries:
uses: infra/ci-snippets/.forgejo/workflows/go-binaries.yml@master
with:
binary-name: dockerhub-ratelimit-exporter
docker:
uses: infra/ci-snippets/.forgejo/workflows/docker-build.yml@master
secrets: inherit

View file

@ -1,41 +0,0 @@
.parallel:
parallel:
matrix:
- GOOS: "linux"
GOARCH:
- amd64
- arm64
- GOOS: "windows"
GOARCH:
- amd64
- arm64
- GOOS: "darwin"
GOARCH:
- amd64
- arm64
stages:
- build
- deploy
build-application-binary:
stage: build
needs: []
parallel: !reference [ .parallel, parallel ]
image: golang:1.27.4
script:
- GOPROXY=https://goproxy.jonasled.dev,direct CGO_ENABLED=0 go build -ldflags="-s -w" -o dockerhub-ratelimit-exporter-${GOOS}-${GOARCH} ./
- "if [ \"${GOOS}\" = \"windows\" ]; then
\ mv dockerhub-ratelimit-exporter-${GOOS}-${GOARCH} dockerhub-ratelimit-exporter-${GOOS}-${GOARCH}.exe\
fi\n"
artifacts:
paths:
- dockerhub-ratelimit-exporter-${GOOS}-${GOARCH}
- dockerhub-ratelimit-exporter-${GOOS}-${GOARCH}.exe
expire_in: 1 week
include:
- project: 'infra/ci'
file: '/pipelines/docker.yml'