Keep your Stacklit codebase index (stacklit.json + DEPENDENCIES.md) up to date automatically via GitHub Actions.
| Mode | Behavior |
|---|---|
auto-commit (default) | Regenerates the index and commits any changes back to the branch |
check | Fails the workflow if the index is stale - useful for PRs |
Regenerate and commit the index whenever code changes land on main:
name: Update stacklit indexon:
push:
branches: [main]paths-ignore: ['stacklit.json', 'DEPENDENCIES.md', '**.md']jobs:
stacklit:
runs-on: ubuntu-latestpermissions:
contents: writesteps:
- uses: actions/checkout@v4
- uses: glincker/stacklit-action@v1Fail the PR if the index wasn't updated:
name: Check stacklit indexon: [pull_request]jobs:
stacklit:
runs-on: ubuntu-lateststeps:
- uses: actions/checkout@v4
- uses: glincker/stacklit-action@v1with:
mode: check| Input | Default | Description |
|---|---|---|
mode | auto-commit | auto-commit or check |
version | latest | Stacklit version (e.g. v0.3.0) |
args | "" | Extra args for stacklit generate |
Auto-commit mode requires permissions: contents: write on the job.
MIT