catchen/Check Git Status

Fail the workflow or git push based if git status is not clean.

View on GitHub

Trust Signals

Scorecard Score
not yet scored
Maintenance Recency
Activelast commit Jun 22, 2026
License
MIT

Pinned Snippet

workflow.ymlSHA-pinned
uses: catchen/check-git-status-action@cc5a79733c441f67cd0cd076de116cd2eebcebfe # v2.1.3

tags can be moved; commit SHAs can't. why a SHA?

namedescriptionrequireddefault
fail-if-not-cleanFail the workflow if git status is not clean.notrue
push-if-not-cleanCommit the changes and push them to the origin if git status is not clean.nofalse
request-changes-if-not-cleanRequest change when in the context of a Pull Request if git status is not clean.notrue
comment-if-not-cleanComment when in the context of a Pull Request if git status is not clean.nofalse
github-tokenGitHub token to use when pushing new changes.no${{ github.token }}
push-tokenGitHub token to use when pushing new changes.no${{ github.token }}
request-changes-tokenGitHub token to use when requesting changes in a Pull Request.no${{ github.token }}
commit-messageThe commit message to use when `push-if-not-clean` is `true` and there are changes.noChanges detected by Check Git Status Action
push-strategyPush strategy to use when pushing changes: `force-with-lease` (default), `force`, or `normal`.noforce-with-lease
request-changes-commentThe comment to use when `request-changes-if-not-clean` is `true` and there are changes.noChanges detected by Check Git Status Action
comment-messageThe comment to use when `comment-if-not-clean` is `true` and there are changes.noChanges detected by Check Git Status Action
targetsFiles, directories, and/or globs to check and commit. Use a newline-separated list for multiple targets.no.
namedescription
statusIs git status clean or dirty?
shaCommit hash when push-if-not-clean is set to true and the status is dirty.