Skip to content

GitHub Action

Check Commit Exists

v1 Latest version
Use latest version

Check Commit Exists

Check if a commit exists in the current repository history


Copy and paste the following snippet into your .yml file.

- name: Check Commit Exists
  uses: betanzos/check-commit-exist@v1
Learn more about this action in betanzos/check-commit-exist
Choose a version

Check Commit Exist

License CI Action type

Supported runners

Supported runner Supported runner Supported runner

This action check if a commit (see commit param) exists in the current fetched history of your repository.

If commit was not found the job using the action finish with status failure (see job context doc).


- uses: betanzos/check-commit-exist@v1
    # SHA of the commit to check if it exists.
    commit: ${{ github.sha }}

    # Inverts the action job finish status
    # (if `success` will be `failure` and if `failure` will be `success`).
    # Can be one of: 'true' or 'false'. Wrong values causes to use default.
    invert: 'false'


The source code, scripts and documentation in this project are released under the Apache-2.0 License