You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Check uncommitted changes
v1.0.0
A GitHub action for checking if repository has uncommitted changes.
Value indicating if there are uncommitted changes in the repository. If changed
is equal to 1
there are uncommitted changes. No changes will return 0
.
name: Check uncommitted changes
jobs:
check-uncommitted-changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
- name: Make uncommitted changes by creating empty file
run: touch uncommitted.tmp
- name: Check for uncommitted changes
id: check-changes
uses: mskri/[email protected]
- name: Evaluate if there are changes
if: steps.check-changes.outputs.changes == 1
run: echo "There are uncommitted changes"
Note: You can change the id
of the step but remember to change the referencing id
on the subsequent step(s).