DEV Community

Sam
Sam

Posted on

Simple Diff

I was building a GitHub Action and needed the jobs to NOT run if a file had just been deleted, so I built Simple Diff.

You're Welcome

😄   Fun Fact: It was built 100% on GitHubs' web UI with the help of NPM Worker

GitHub logo mudlabs / simple-diff

A super simple diff checker for your GitHub workflow.

github-action   github-sponsor

Simple Diff

A super simple diff checker for your GitHub workflow.

Very simple, you provide the action with a path to a file or folder, and it tells you if the file was added, modified, removed, or renamed. It will also output the items name and previous name, particularly usefull if it was just renamed.

Table of Contents

Usage

- name: Simple Diff
  uses: mudlabs/simple-diff@v1.2.0
  with
    path: path/to/file   
Enter fullscreen mode Exit fullscreen mode

Inputs

Input Description Default
path Specifies a path from the root of your repository to the file or folder you want to check. If not provided the action will try to find a path specification from the workflow file itself. The path can be a glob string.
strict Specifies the action should fail if the path is not in the commits diff tree. true

Outputs

Output Type
…

Top comments (0)