Skip to content

Latest commit

 

History

History
47 lines (33 loc) · 1.22 KB

README.md

File metadata and controls

47 lines (33 loc) · 1.22 KB

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"