move to codeberg (#1)

Co-authored-by: Thomas von Dein <tom@vondein.org>
Reviewed-on: https://codeberg.org/scip/io-exporter/pulls/1
This commit is contained in:
T. von Dein
2025-10-31 22:29:44 +01:00
parent 662dc39e8f
commit 7854627ff3
8 changed files with 150 additions and 9 deletions

67
.goreleaser.yaml Normal file
View File

@@ -0,0 +1,67 @@
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
version: 2
before:
hooks:
- go mod tidy
gitea_urls:
api: https://codeberg.org/api/v1
download: https://codeberg.org
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- freebsd
archives:
- formats: [tar.gz]
# this name template makes the OS and Arch compatible with the results of `uname`.
name_template: >-
{{ .ProjectName }}_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}_{{ .Tag }}
# use zip for windows archives
format_overrides:
- goos: windows
formats: [zip]
- goos: linux
formats: [tar.gz,binary]
files:
- src: "*.md"
strip_parent: true
- src: "docs/*"
strip_parent: true
- src: Makefile.dist
dst: Makefile
wrap_in_directory: true
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
groups:
- title: Improved
regexp: '^.*?(feat|add|new)(\([[:word:]]+\))??!?:.+$'
order: 0
- title: Fixed
regexp: '^.*?(bug|fix)(\([[:word:]]+\))??!?:.+$'
order: 1
- title: Changed
order: 999
release:
header: "# Release Notes"
footer: >-
---
Full Changelog: [{{ .PreviousTag }}...{{ .Tag }}](https://codeberg.org/scip/io-exporter/compare/{{ .PreviousTag }}...{{ .Tag }})

27
.woodpecker/build.yaml Normal file
View File

@@ -0,0 +1,27 @@
matrix:
platform:
- linux/amd64
goversion:
- 1.24
labels:
platform: ${platform}
steps:
build:
when:
event: [push]
image: golang:${goversion}
commands:
- go get
- go build
- go test
linter:
when:
event: [push]
image: golang:${goversion}
commands:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin v2.5.0
- golangci-lint --version
- golangci-lint run ./...

32
.woodpecker/image.yaml Normal file
View File

@@ -0,0 +1,32 @@
# https://woodpecker-ci.org/plugins/docker-buildx
# enable Package unit and go to /scip/-/packages after building to link to proj
variables:
- &repo codeberg.org/${CI_REPO_OWNER}/io-exporter
steps:
dryrun:
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
settings:
dockerfile: Dockerfile
platforms: linux/amd64
dry_run: true
repo: *repo
tags: latest
when:
event: [pull_request]
publish:
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
settings:
dockerfile: Dockerfile
platforms: linux/amd64
repo: *repo
registry: codeberg.org
tags: latest,${CI_COMMIT_SHA:0:8},${CI_COMMIT_TAG}
username: ${CI_REPO_OWNER}
password:
from_secret: REGISTRY_TOKEN
when:
event: [tag]
branch: main

15
.woodpecker/release.yaml Normal file
View File

@@ -0,0 +1,15 @@
# build release
labels:
platform: linux/amd64
steps:
goreleaser:
image: goreleaser/goreleaser
when:
event: [tag]
environment:
GITEA_TOKEN:
from_secret: DEPLOY_TOKEN
commands:
- goreleaser release --clean --verbose

View File

@@ -1,4 +1,4 @@
FROM golang:1.24-alpine as builder
FROM golang:1.24-alpine AS builder
RUN apk update
RUN apk upgrade

View File

@@ -1,6 +1,6 @@
[![Actions](https://github.com/tlinden/io-exporter/actions/workflows/ci.yaml/badge.svg)](https://github.com/tlinden/io-exporter/actions)
[![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://github.com/tlinden/io-exporter/blob/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/tlinden/io-exporter)](https://goreportcard.com/report/github.com/tlinden/io-exporter)
[![Actions](https://codeberg.org/scip/io-exporter/actions/workflows/ci.yaml/badge.svg)](https://codeberg.org/scip/io-exporter/actions)
[![License](https://img.shields.io/badge/license-GPL-blue.svg)](https://codeberg.org/scip/io-exporter/raw/branch/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/codeberg.org/scip/io-exporter)](https://goreportcard.com/report/codeberg.org/scip/io-exporter)
# io-exporter
@@ -88,7 +88,7 @@ docker compose run -v ./t:/pvc ioexporter /pvc/testfile
Or use the pre-build image:
```default
docker run -u `id -u $USER` -v ./t:/pvc ghcr.io/tlinden/io-exporter:latest /pvc/testfile
docker run -u `id -u $USER` -v ./t:/pvc codeberg.org/scip/io-exporter:latest /pvc/testfile
```
## Grafana
@@ -98,11 +98,11 @@ as a starting point to integrate it into your monitoring setup.
It looks like this:
![Screenshot](https://github.com/TLINDEN/io-exporter/blob/main/grafana/screenshot.png)
![Screenshot](https://codeberg.org/scip/io-exporter/raw/branch/main/grafana/screenshot.png)
# Report bugs
[Please open an issue](https://github.com/TLINDEN/io-exporter/issues). Thanks!
[Please open an issue](https://codeberg.org/scip/io-exporter/issues). Thanks!
# License

2
go.mod
View File

@@ -1,4 +1,4 @@
module github.com/tlinden/io-exporter
module codeberg.org/scip/io-exporter
go 1.23.5

View File

@@ -1,6 +1,6 @@
package main
import "github.com/tlinden/io-exporter/cmd"
import "codeberg.org/scip/io-exporter/cmd"
func main() {
cmd.Run()