Files

1.4 KiB

CI on Gitea (self-hosted runner)

This repo uses a self-hosted Gitea Actions runner. The workflow lives in .gitea/workflows/ci-no-marketplace.yml and targets the labels:

  • self-hosted
  • linux
  • ubuntu-latest:host

Runner config example (no Docker)

Create config.yaml next to the act runner binary/service:

runner:
  capacity: 1
  labels:
    - 'self-hosted'
    - 'linux'
    - 'x64'
    - 'ubuntu-latest:host'

Restart the runner service after changes.

Lockfile policy

When package-lock.json exists, CI runs npm ci (fast, reproducible). Without a lockfile, CI falls back to npm install. Prefer committing a lockfile for stable builds.

Common gotchas

  • Node setup order — Node must be set before installs. The workflow ensures this.
  • Dirty action cache — If you see messages like Unable to pull refs/heads/v4: worktree contains unstaged changes, clean the runner's cached actions (see troubleshooting).

Local preflight

# run the same checks locally
npm run lint:phase0
npm test -- --run

Release environment

For local release scripts (e.g., creating a Gitea release), place secrets in a local .gitea.env file at the repo root and source it when running scripts. Do not commit this file.

  • Use .gitea.env.example as a template.
  • Ensure .gitea.env remains ignored via .gitignore.

If a token was ever committed, rotate it in Gitea and consider cleaning it from history.