Composite actions: restore/save the devenv eval cache on the self-hosted Forgejo runner
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| save | ||
| setup | ||
| README.md | ||
devenv-ci
Composite actions for CI jobs that run devenv shell on the self-hosted
Forgejo runner (the devenv label). They move the project-local eval cache
between the shared cache volume (/var/lib/ci-cache, mounted at /cache) and
the checkout, so a fresh job does not pay for a cold devenv evaluation.
The cache is stored as devenv-eval.tar and replaced with an atomic rename, so
concurrent jobs of one repository never read a half-written SQLite cache.
Usage
jobs:
check:
runs-on: devenv
container:
volumes:
- /nix:/nix:O
- /var/lib/ci-cache:/cache
env:
XDG_CACHE_HOME: /cache/xdg
steps:
- uses: actions/checkout@v4
- uses: actions/devenv-ci/setup@v1
- run: devenv shell -- task go:build
- run: devenv shell -- task go:test
- uses: actions/devenv-ci/save@v1
if: always()
setupmust run before the firstdevenv shell.savemust keepif: always()so the cache is published even when a check failed.uses: actions/...resolves to this instance because itsDEFAULT_ACTIONS_URLpoints atgit.derfenix.pro.- The actions assume the runner-provided job environment (the
devenvlabel, the/nixoverlay and the/cachevolume); outside it they are no-ops or failures.