Gitea
Run Gitea Actions jobs on Laufer: connect with a token, then change runs-on in the workflow.
Token
Create it under Settings → Applications → Generate new token.
Scopes write:repository and read:user. From: An admin or owner of the repository.
Gitea has no permission for runners alone, so this token can also read and change the code, issues and settings of the repositories its owner can write to. Laufer uses it to add a webhook to each repository you enable, and to create and remove a single-use runner for each job.
To limit what the token reaches: create it from an account made for this, which is an admin of only the repositories you use with Laufer.
Laufer stores it encrypted. Sign in, paste it with your instance's address, then tick the repositories to use.
CI change
Change one line in .gitea/workflows/ci.yml:
- runs-on: ubuntu-latest+ runs-on: laufer-ubuntu-latest
For 4 vCPU, use runs-on: laufer-4cpu-ubuntu-latest.
Labels
runs-on | Machine | Per minute |
|---|---|---|
laufer-ubuntu-latest | 2 vCPU, 8 GB | €0.0030 |
laufer-4cpu-ubuntu-latest | 4 vCPU, 16 GB | €0.0050 |
A job is Laufer's only if all its labels are ours, of one size. A job that also names another, such as ubuntu-latest, is ignored.
Environment
The job runs directly on its machine, with git, Node.js, npm and Docker installed. Jobs that use container: have not been tested.
Cache
Use actions/cache@v4. Nothing to configure, not charged for:
on: [push]
jobs:
build:
runs-on: laufer-ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/cache@v4
with:
path: ~/.npm
key: npm-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm test
- run: docker build -t myimage .
Kept per branch, as on GitHub: a job restores from its own branch, then its pull request's base, then the default branch, and saves only to its own.
Fork pull requests
Held by Gitea until someone approves them. A fork's job can read the cache but not save to it.
Waiting jobs
Gitea shows "No matching online runner" next to a workflow that uses our labels. That is expected: Laufer adds a runner only when a job is waiting, and removes it when the job ends. If Actions is off for a repository, Laufer cannot see its jobs. Its connection page says so. The reasons a job waits are the same for all three.