chore(tooling): test forgejo actions
This commit is contained in:
parent
89118c45d1
commit
bc7a129321
1 changed files with 42 additions and 0 deletions
42
.forgejo/workflows/main.yaml
Normal file
42
.forgejo/workflows/main.yaml
Normal file
|
@ -0,0 +1,42 @@
|
|||
---
|
||||
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: |
|
||||
make build
|
||||
- uses: 'actions/upload-artifact@v4'
|
||||
with:
|
||||
if-no-files-found: 'error'
|
||||
name: 'ods-${{ env.GITHUB_REF_NAME }}'
|
||||
path: 'ods'
|
Loading…
Add table
Reference in a new issue