chore(tooling): add forgejo actions workflow

This commit is contained in:
Julien Dessaux 2025-03-12 23:39:21 +01:00
parent 89118c45d1
commit 64c0d5a297
Signed by: adyxax
GPG key ID: F92E51B86E07177E

View file

@ -0,0 +1,46 @@
---
on:
push:
workflow_dispatch:
jobs:
fmt:
runs-on: 'self-hosted'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-go@v5'
with:
go-version-file: 'go.mod'
- run: |
make tidy no-dirty
test:
runs-on: 'self-hosted'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-go@v5'
with:
go-version-file: 'go.mod'
- run: |
make check tidy no-dirty
build:
if: "${{ startsWith(github.ref, 'refs/tags/') }}"
needs:
- 'fmt'
- 'test'
runs-on: 'self-hosted'
steps:
- uses: 'actions/checkout@v4'
- uses: 'actions/setup-go@v5'
with:
go-version-file: 'go.mod'
- run: |
printf '%s' "$GIT_CRYPT_SECRET" > secret
git-crypt unlock secret
make build
env:
GIT_CRYPT_SECRET: '${{ secrets.GIT_CRYPT }}'
- uses: 'actions/upload-artifact@v4'
with:
if-no-files-found: 'error'
name: 'ods-${{ env.GITHUB_REF_NAME }}'
path: 'ods'