chore(ci): switch to Gitea actions
Some checks failed
Renovate / renovate (push) Successful in 39s
Go build / build (push) Has been cancelled

This commit is contained in:
Peter 2023-11-29 22:01:37 +01:00
parent e34cbb938a
commit ebd0729b05
No known key found for this signature in database
4 changed files with 67 additions and 83 deletions

View file

@ -1,72 +0,0 @@
---
kind: pipeline
type: docker
name: default
trigger:
event:
- push
- pull_request
- tag
steps:
- name: Lint
image: docker.io/golangci/golangci-lint:latest
environment:
GO111MODULE: "on"
CGO_ENABLED: "0"
GOMEMLIMIT: "1150MiB"
volumes:
- name: go-cache
path: /go
commands:
- golangci-lint run -v
- name: Test
image: docker.io/golang:1.20-bullseye
network_mode: host
environment:
GO111MODULE: "on"
CGO_ENABLED: "1"
DOCKER_HOST: tcp://localhost:2375
volumes:
- name: go-cache
path: /go
commands:
- go install gotest.tools/gotestsum@latest
- gotestsum --junitfile out/results.xml --format pkgname-and-test-fails -- -race -shuffle=on ./...
- name: junit-reports
image: ghcr.io/rohit-gohri/drone-junit:v0
settings:
paths: out/results.xml
volumes:
- name: go-cache
temp: { }
---
kind: pipeline
type: docker
name: housekeeping
trigger:
event:
- cron
cron:
- housekeeping
steps:
- name: Renovate
image: code.icb4dc0.de/prskr/ci-images/renovate:latest
commands:
- renovate "${DRONE_REPO}"
environment:
RENOVATE_TOKEN:
from_secret: gitea_token
GITHUB_COM_TOKEN:
from_secret: github_token
RENOVATE_PLATFORM: gitea
RENOVATE_AUTODISCOVER: "false"
RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1
LOG_LEVEL: info

View file

@ -0,0 +1,38 @@
name: Go build
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
lfs: 'true'
fetch-tags: 'true'
- name: Setup Go 1.21.x
uses: actions/setup-go@v4
with:
# Semantic version range syntax or exact version of Go
go-version: '1.21.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
- name: Install Task
uses: arduino/setup-task@v1
- name: Run tests
run: |
go install gotest.tools/gotestsum@latest
gotestsum --junitfile out/results.xml --format pkgname-and-test-fails -- -race -shuffle=on ./...
- uses: goreleaser/goreleaser-action@v4
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
with:
distribution: goreleaser
version: latest
args: release --clean --snapshot

View file

@ -0,0 +1,22 @@
name: Renovate
on:
push:
branches:
- main
schedule:
- cron: '33 3 * * *'
jobs:
renovate:
runs-on: ubuntu-latest
steps:
- uses: docker://code.icb4dc0.de/infrastructure/images/renovate:latest
with:
args: renovate "${{ github.repository }}"
env:
RENOVATE_TOKEN: ${{ secrets.GITEA_TOKEN }}
GITHUB_COM_TOKEN: ${{ secrets.RENOVATE_GITHUB_TOKEN }}
RENOVATE_PLATFORM: gitea
RENOVATE_AUTODISCOVER: "false"
RENOVATE_ENDPOINT: https://code.icb4dc0.de/api/v1
LOG_LEVEL: info

View file

@ -12,13 +12,9 @@ builds:
- linux
- windows
- darwin
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
386: i386
amd64: x86_64
goarch:
- amd64
- arm64
checksum:
name_template: 'checksums.txt'
snapshot:
@ -34,8 +30,8 @@ dockers:
- ids:
- nurse
image_templates:
- ghcr.io/baez90/nurse:latest
- ghcr.io/baez90/nurse:{{ .Tag }}
- ghcr.io/baez90/nurse:{{ .Major }}
- ghcr.io/baez90/nurse:{{ .ShortCommit}}
- code.icb4dc0.de/prskr/nurse:latest
- code.icb4dc0.de/prskr/nurse:{{ .Tag }}
- code.icb4dc0.de/prskr/nurse:{{ .Major }}
- code.icb4dc0.de/prskr/nurse:{{ .ShortCommit}}
dockerfile: deployments/Dockerfile