From bc7a12932164ef64c9fdba0d81d1261c2c575274 Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Wed, 12 Mar 2025 23:39:21 +0100 Subject: [PATCH] chore(tooling): test forgejo actions --- .forgejo/workflows/main.yaml | 42 ++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .forgejo/workflows/main.yaml diff --git a/.forgejo/workflows/main.yaml b/.forgejo/workflows/main.yaml new file mode 100644 index 0000000..379e75e --- /dev/null +++ b/.forgejo/workflows/main.yaml @@ -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'