Skip to content
This repository was archived by the owner on Jun 25, 2026. It is now read-only.

Choose a tag to compare

@tenedev tenedev released this 06 Feb 19:12
· 31 commits to main since this release

Diff Sentinel is a GitHub Action that runs your generation or formatting commands, checks for uncommitted changes using git diff, and fails CI when the repository is out of sync.

Features

  • Run multiple commands before checking for diffs

  • Reliably detect uncommitted changes using git diff

  • Fail workflows when generated or formatted files are not committed

  • Clear, grouped logs in the GitHub Actions UI

  • Rich Job Summary explaining:

    • what changed
    • why the job failed
    • how to fix it
  • Structured outputs for downstream steps:

    • has_diff
    • changed_files
    • diff_count
    • command_failures

Configuration Options

  • run (required) — Commands to execute before checking for diffs
  • fail-message — Custom failure message shown in logs and the Job Summary
  • fail-on-command-error — Fail CI when any command fails
  • fail-on-diff — Fail CI when uncommitted changes are detected

Why use Diff Sentinel?

Diff Sentinel helps prevent common CI issues caused by:

  • forgotten generated files
  • uncommitted formatting changes
  • drifting build artifacts
  • inconsistent derived files in pull requests

Instead of silently passing CI, Diff Sentinel provides immediate, actionable feedback to contributors.

Usage

- uses: teneplaysofficial/diff@v1
  with:
    run: |
      pnpm build
      pnpm gen
      pnpm fmt

See the README for full usage examples and configuration details.

Full Changelog: https://github.com/teneplaysofficial/diff/commits/1.0.0