huntapi/docs/gitea-actions-setup.md
Finn Skov Henriksen d7479db902
Some checks failed
Build / Restore, build and publish (push) Failing after 2m7s
first commit
2026-08-31 12:29:23 +02:00

57 lines
1.6 KiB
Markdown

# Gitea Actions setup
This project builds automatically with Gitea Actions when changes are pushed to
the `master` branch. The workflow is defined in `.gitea/workflows/ci.yml`.
## One-time Gitea server setup
1. Make sure the Gitea server is version 1.19.0 or newer.
2. If the server is older than 1.21.0, enable Actions in `app.ini`:
```ini
[actions]
ENABLED = true
```
3. Restart Gitea after changing `app.ini`.
4. In the repository settings, enable repository Actions.
5. Register at least one Gitea runner for the instance, organization, or repository.
## Runner setup
Install Docker on the runner host, then register a runner with a token from:
- Instance runner: `http://git.fshcomputer.dk:3000/-/admin/actions/runners`
- Repository runner: `http://git.fshcomputer.dk:3000/<owner>/<repo>/settings/actions/runners`
Example:
```bash
./act_runner register --no-interactive \
--instance http://git.fshcomputer.dk:3000 \
--token <runner-token>
./act_runner daemon
```
The workflow uses the `ubuntu-latest` runner label and installs .NET 10 with
`actions/setup-dotnet@v4`. The repository also contains a `NuGet.config` file so
the build uses `nuget.org` instead of machine-specific package feeds.
The runner must be able to reach `github.com`/`gitea.com` for actions and
`api.nuget.org` for packages unless you configure a local action/package mirror.
## First push
The local repository currently needs its first commit and a `master` branch for
this workflow to trigger:
```bash
git branch -M master
git add .
git commit -m "Add Gitea CI workflow"
git push -u origin master
```
After the push, open the repository's Actions tab in Gitea.