fix: run stacklit action on push to master, not PRs#16
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Stacklit index GitHub Actions workflow so the index is regenerated and committed automatically on pushes to master, rather than running in “check” mode on pull requests.
Changes:
- Switch workflow trigger from
pull_requesttopushonmaster. - Change Stacklit action mode from
checktoauto-commit. - Grant
contents: writepermission to allow committing updates back to the repo.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| branches: [master] | ||
|
|
||
| jobs: | ||
| stacklit: |
There was a problem hiding this comment.
Because this workflow auto-commits, the resulting push to the same branch will re-trigger the workflow (at least once). To avoid redundant runs (and prevent potential loops if generated files vary), add paths-ignore for the generated outputs (e.g., stacklit.json and DEPENDENCIES.md) and/or guard with an if: that skips when the actor is the bot doing the commit.
| branches: [master] | |
| jobs: | |
| stacklit: | |
| branches: [master] | |
| paths-ignore: | |
| - stacklit.json | |
| - DEPENDENCIES.md | |
| jobs: | |
| stacklit: | |
| if: github.actor != 'github-actions[bot]' |
| on: | ||
| pull_request: | ||
| push: | ||
| branches: [master] |
There was a problem hiding this comment.
This workflow triggers only on master, but other workflows in this repo run on both master and main. If main is still used (or becomes the default branch), this index updater will stop running; consider including both branches ([master, main]) for consistency.
| branches: [master] | |
| branches: [master, main] |
Summary
What changes
pull_request→pushtomastercheck→auto-commitpermissions: contents: writefor auto-commit