Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
check

GitHub Action

Verified commits check

v1.0.0

Verified commits check

check

Verified commits check

Check pushed commits for unverified commits

Installation

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

              

- name: Verified commits check

uses: Nadock/[email protected]

Learn more about this action in Nadock/verified_commits_check

Choose a version

Verified Commits Check

black black black black black

A GitHub Action to check commits pushed to a repositiory to ensure they are verified (aka signed).

Setup

Copy the text below into a file in your repository called .github/workflows/verified_commits_check.yml, then just commit and push it!

# .github/workflows/verified_commits_check.yml
name: Run verified commits check

on: push

jobs:
  verified_commit_check:
    name: Check for unverified commits
    runs-on: ubuntu-latest
    steps:
      - uses: nadock/verified_commits_check@v1

You can see this example in action in this repository here.

Common questions

What are verified commits?

Verified commits are commits that have been GPG signed by their author, ensuring they truely do come from a trusted source. GitHub has more details in their documentation here, including how to setup commit signing if you haven't already.

When you commits are verified, you should see the "Verified" badge on your commits like this:

An example of the verified commits badge

Why not just use the branch protection rule?

GitHub provides a branch protection rule to prevent unverified commits from being merged into protected branches. However, you usually get little or no warning you've mistakenly pushed unsiged commits until you try to merge your PR. This action will warn you whenever you push unverified commits, allowing you to notice and fix the issue sooner.

I wish it sent messages to X...

Okay technically not a question, but if you want to add support for sending a message to some other service when unverified commits are detected (other than the default failed action email) I welcome pull requests to add support. Please check the CONTRIBUTING.md file for more detials.