Skip to content

Action to find out rather a directory had changes or not in last commit

License

Notifications You must be signed in to change notification settings

georgeneto/directory-changes-checker

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

directory-changes-checker

Action to find out whether a directory had changes or not in last commit.
Looks for the list of files changed in the last commit. If given directory is present in the changes it returns true, otherwise, returns false.

eg: directory: "checker"

my/dir/file.exe is not a match ❌
test/my-checker/ is not a match ❌
test/my/checker/ is a match ✅
checker/subfolder is a match ✅

steps:

      ...
      - name: Check if directory has changes
        id: directory_changes_checker
        uses: georgeneto/directory-changes-checker@v1
        with:
          repo-token: ${{secrets.GITHUB_TOKEN}}
          directory: "{REPLACE_BY_DIRECTORY_NAME}"
          
      - name: Any other step
        if: ${{steps.directory_changes_checker.output.hasChanges}} == 'true' #running other step only if directory is found in the list of files from last commit
        ...

and the boolean output may be used as: ${{ steps.directory_changes_checker.outputs.hasChanges }}

About

Action to find out rather a directory had changes or not in last commit

Resources

License

Stars

Watchers

Forks

Packages

No packages published