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
-
Make sure the Gitea server is version 1.19.0 or newer.
-
If the server is older than 1.21.0, enable Actions in
app.ini:[actions] ENABLED = true -
Restart Gitea after changing
app.ini. -
In the repository settings, enable repository Actions.
-
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.