huntapi/docs/gitea-actions-setup.md
Finn Skov Henriksen 8f7f0cc1c5
All checks were successful
Build / Restore, build and publish (push) Successful in 1m7s
korrigeret ci config
2026-08-31 13:52:29 +02:00

1.8 KiB

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:

    [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:

./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.

Gitea Actions currently treats actions/upload-artifact@v4 as unsupported in this environment, so the workflow intentionally uses actions/upload-artifact@v3.

First push

The local repository currently needs its first commit and a master branch for this workflow to trigger:

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.