Skip to content

Fail If Changes

Actions

About

Check if a git repository has uncommitted changes
v1.1.1
Latest
Star (0)

Has Changes

GitHub action for checking if the repo is dirty (has uncommitted changes).

This action will fail if there are uncommitted changes and succeed otherwise

Why?

This is useful for things like checking if post build steps like generating dynamic sitemaps need to have results checked in.

How?

Add a step in a job after any steps whose code changes you want to check.

Example

name: Has Changes
jobs:
  has-changes:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
      with:
        ref: ${{ github.head_ref }}
    - name: Make changes
      run: touch change.temp
    # This step will evaluate the repo status and report the change
    - name: Check if there are changes
      uses: NathanielHill/fail-if-changes@master

Fail If Changes is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Check if a git repository has uncommitted changes
v1.1.1
Latest

Fail If Changes is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.