fix(ci): rename workflows; add golang ci lint

This commit is contained in:
2025-08-12 09:14:34 +02:00
parent 375c92edaf
commit 26e4986b7e
15 changed files with 441 additions and 870 deletions

View File

@ -0,0 +1,29 @@
name: "Lint Golang files"
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
permissions:
contents: read
jobs:
golangci:
name: "Run golang CI linter"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
- uses: golangci/golangci-lint-action@v8.0.0
with:
version: v2.3.0 # renovate: datasource=github-releases depName=golangci/golangci-lint

View File

@ -0,0 +1,42 @@
name: "Run Golang tests"
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '**' ]
tags-ignore: [ '**' ]
workflow_dispatch: {}
jobs:
# integration-test:
# name: "Run integration tests"
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# go: [ stable ]
# os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
# steps:
# - uses: actions/checkout@v4.3.0
# - uses: actions/setup-go@v5.5.0
# with:
# go-version: ${{ matrix.go }}
# - env:
# GOPROXY: ${{ vars.GOPROXY }}
# run: make test/integration
unit-test:
name: "Run unit tests"
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ stable ]
os: [ ubuntu-latest-amd64, ubuntu-latest-arm64 ]
steps:
- uses: actions/checkout@v4.3.0
- uses: actions/setup-go@v5.5.0
with:
go-version: ${{ matrix.go }}
- env:
GOPROXY: ${{ vars.GOPROXY }}
run: make test/unit

View File

@ -0,0 +1,19 @@
name: "Lint Markdown files"
on:
pull_request:
types: [ "opened", "reopened", "synchronize" ]
push:
branches: [ '*' ]
tags-ignore: [ '*' ]
workflow_dispatch: {}
jobs:
markdown-lint:
name: "Run markdown linter"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.3.0
- uses: DavidAnson/markdownlint-cli2-action@v20.0.0
with:
globs: '**/*.md'

View File

@ -0,0 +1,52 @@
name: "Release"
on:
push:
tags: [ '**' ]
permissions:
contents: write
jobs:
release:
name: "Release application"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.3.0
- uses: docker/setup-qemu-action@v3.6.0
- uses: actions/setup-go@v5.5.0
with:
go-version: stable
- uses: docker/login-action@v3.5.0
with:
registry: git.cryptic.systems
username: ${{ github.repository_owner }}
password: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
- env:
GITEA_TOKEN: ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }}
GONOSUMDB: ${{ vars.GONOSUMDB }}
GOPROXY: ${{ vars.GOPROXY }}
uses: goreleaser/goreleaser-action@v6.3.0
with:
version: v2.11.2 # renovate: datasource=github-releases depName=goreleaser/goreleaser
args: release --clean
# sync-to-hub-docker-io:
# name: "Upload Images to docker.io"
# needs:
# - release
# runs-on: ubuntu-latest
# steps:
# - name: Copy images to docker.io
# run: |
# TAG=$(echo ${{ github.ref_name }} | sed 's/v//gm')
# apt-get update --yes
# apt-get install --yes skopeo
# skopeo copy \
# --all \
# --dest-password ${{ secrets.DOCKER_IO_PASSWORD }} \
# --dest-username ${{ secrets.DOCKER_IO_USERNAME }} \
# --src-password ${{ secrets.GIT_CRYPTIC_SYSTEMS_PACKAGE_REGISTRY_TOKEN }} \
# --src-username volker.raschek \
# docker://git.cryptic.systems/volker.raschek/getidev:${TAG} \
# docker://docker.io/volkerraschek/getidev:${TAG}

View File

@ -0,0 +1,19 @@
# name: "Update Docker Hub Description"
# on:
# push:
# branches: [ 'master' ]
# paths: [ 'README.md' ]
# workflow_dispatch: {}
# jobs:
# update-description-on-hub-docker-io:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4.3.0
# - uses: peter-evans/dockerhub-description@v4.0.2
# with:
# username: ${{ secrets.DOCKER_IO_USERNAME }}
# password: ${{ secrets.DOCKER_IO_PASSWORD }}
# repository: volkerraschek/getidev
# readme-filepath: README.md