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 index
on:
push:
branches: [main]
paths-ignore: ['stacklit.json', 'DEPENDENCIES.md', '**.md']
jobs:
stacklit:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: glincker/stacklit-action@v1Fail the PR if the index wasn't updated:
name: Check stacklit index
on: [pull_request]
jobs:
stacklit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: glincker/stacklit-action@v1
with:
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