younited / detect-branch-changes-action

Action to detect changes in a branch

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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/detect-branch-changes-action@v0.1.3

Detect changes in different root folders

- uses: younited/detect-branch-changes-action@v0.1.3
  with:
    pathspec: "application configs"

Detect file changes

- uses: younited/detect-branch-changes-action@v0.1.3
  with:
    pathspec: "a/dee/nested/folder/*.rb"

Detect based on an other branch

- uses: younited/detect-branch-changes-action@v0.1.3
  with:
    base_branch: "hotfix-147"

About

Action to detect changes in a branch

License:MIT License


Languages

Language:Shell 100.0%