- Change @main references to @v1 (major version tag) - Add versioning section explaining tag options: - @v1 for auto-updates within major version - @v1.0.0 for pinned versions - @main for development (not recommended)
51 lines
1.4 KiB
Markdown
51 lines
1.4 KiB
Markdown
# gitea-actions
|
|
|
|
Reusable Gitea Actions for CI workflows.
|
|
|
|
## Actions
|
|
|
|
### nix-setup
|
|
|
|
Installs Nix and sets up Nix store caching for Gitea Actions workflows.
|
|
|
|
**Features:**
|
|
- Uses DeterminateSystems/nix-installer-action for reliable Nix installation
|
|
- Caches `/nix/store`, `/nix/var/nix`, and `~/.cache/nix`
|
|
- Cache key based on `flake.lock` hash for automatic invalidation
|
|
- Each repo gets isolated cache (different flake.lock = different cache)
|
|
|
|
**Usage:**
|
|
|
|
```yaml
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@v1
|
|
- run: nix flake check
|
|
```
|
|
|
|
> **Note:** Full URL required for Gitea Actions to reference actions from the same instance (short-form defaults to GitHub).
|
|
|
|
**Versioning:**
|
|
|
|
This repo uses semantic versioning. Reference actions by:
|
|
- `@v1` - Major version (recommended, auto-updates to latest v1.x.x)
|
|
- `@v1.0.0` - Specific version (pinned, no auto-updates)
|
|
- `@main` - Latest development (not recommended for production)
|
|
|
|
**With custom cache prefix:**
|
|
|
|
```yaml
|
|
- uses: https://git.johnogle.info/johno/gitea-actions/nix-setup@v1
|
|
with:
|
|
cache-name: 'my-project-'
|
|
```
|
|
|
|
**Inputs:**
|
|
|
|
| Input | Description | Required | Default |
|
|
|-------|-------------|----------|---------|
|
|
| `cache-name` | Optional cache name prefix for disambiguation | No | `''` |
|