Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GHA: Attach labeler context to to PR target-branch
Unlike the vast majority of CI systems, GitHub Action workflow YAML is sourced differently at runtime based on the trigger type. This can creates a "gotcha" for maintainers because the action is operating on a PR but the job definition comes from `main`. Therefore over-time, with respect to the 'labeler' workflow, the semantics of both labels and globs (in `.github/labeler.yml`) may diverge between release branches and `main`. Fix this by leveraging the "reusable workflows" feature in the `labeler.yml` worflow (on `main`), to call the new `_labeler.yml` workflow YAML on the target branch of the PR. This allows changes to both the `_labeler.yml` workflow and `.github/labeler.yml` globs to follow branch-content instead of main. Note: Any branch which does not contain `.github/workflows/_labeler.yml` and `.github/labeler.yml` files will fail. This can be corrected as needed by backporting those files and making any needed branch-specific updates. Signed-off-by: Chris Evich <[email protected]>
- Loading branch information