Skip to content

younited/detect-branch-changes-action

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

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Detect Branch Changes

This is GitHub Action allows you to detect all changes in a branch. This is done by detecting the fork-point of the current branch with the repo's main branch.

Inputs

  • base_branch - Branch where the fork-point will be found on. Defaults to the repo's default_branch.
  • pathspec - Which paths should be considered to detect changes on. This path spec must be compattible with the git diff command.

Outputs

  • changed - Returns "true" or "false" if files were changed on the current branch since it was forked from base_branch.
  • fork_point_sha - The commit SHA that is considered the fork point between this branch and and the base_branch.

Usage

Detect all changes (default behaviour)

- uses: younited/[email protected]

Detect changes in different root folders

- uses: younited/[email protected]
  with:
    pathspec: "application configs"

Detect file changes

- uses: younited/[email protected]
  with:
    pathspec: "a/dee/nested/folder/*.rb"

Detect based on an other branch

- uses: younited/[email protected]
  with:
    base_branch: "hotfix-147"