GitHub Action to identify a path of changed files on monorepos, with regex and depth validation.
Example use-case is execution path for Terraform monorepo. The GitHub action fetches changed files from the GitHub PR API, validates paths to determine what directory Terraform execution needs to happen.
Using a container for action delivery avoids spending time fetching repo, dependencies, and compiling. Recommended use is container delivery via: docker://paha/github-action-tf-path
PR id is taken from GITHUB_REF_NAME, if fails, pr_number input is taken.
The path is persisted as a Pull Request label tf_path: PATH for visibility.