catchen/Check Git Status
Fail the workflow or git push based if git status is not clean.
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jun 22, 2026
- License
- MIT
Pinned Snippet
uses: catchen/check-git-status-action@cc5a79733c441f67cd0cd076de116cd2eebcebfe # v2.1.3tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| fail-if-not-clean | Fail the workflow if git status is not clean. | no | true |
| push-if-not-clean | Commit the changes and push them to the origin if git status is not clean. | no | false |
| request-changes-if-not-clean | Request change when in the context of a Pull Request if git status is not clean. | no | true |
| comment-if-not-clean | Comment when in the context of a Pull Request if git status is not clean. | no | false |
| github-token | GitHub token to use when pushing new changes. | no | ${{ github.token }} |
| push-token | GitHub token to use when pushing new changes. | no | ${{ github.token }} |
| request-changes-token | GitHub token to use when requesting changes in a Pull Request. | no | ${{ github.token }} |
| commit-message | The commit message to use when `push-if-not-clean` is `true` and there are changes. | no | Changes detected by Check Git Status Action |
| push-strategy | Push strategy to use when pushing changes: `force-with-lease` (default), `force`, or `normal`. | no | force-with-lease |
| request-changes-comment | The comment to use when `request-changes-if-not-clean` is `true` and there are changes. | no | Changes detected by Check Git Status Action |
| comment-message | The comment to use when `comment-if-not-clean` is `true` and there are changes. | no | Changes detected by Check Git Status Action |
| targets | Files, directories, and/or globs to check and commit. Use a newline-separated list for multiple targets. | no | . |
Outputs
| name | description |
|---|---|
| status | Is git status clean or dirty? |
| sha | Commit hash when push-if-not-clean is set to true and the status is dirty. |