Commit c168993
committed
GH Actions: safeguard the PR label workflow some more
The `srvaroa/labeler` action runner will use the `labeler.yml` from the repo's default branch by default, which is good from a security perspective, but that means that PRs changing the `labeler.yml` file will not be tested until they have been merged and a _next_ PR is opened.
As the `srvaroa/labeler` action runner will silently fail, this also means that the labeling will stop working without any indication (other than labels no longer being added).
I'd like to prevent getting into that situation (again). The `yamllint` workflow I introduced earlier is already a big step in the right direction.
This commit introduces a second safeguard:
* It adds a second job to the workflow which will only run when the files relevant for the workflow are being changed in a PR.
* In that case, this second job will:
- run with the PR-local version of the `labeler.yml` file;
- run on **_all_** pull request events (except merge), not only when the PR is opened.
- fail the workflow run if any errors are encountered.
This should make sure that this workflow is safeguarded properly and will continuing functioning as intended, even when changes are made to the logic.
Refs:
* srvaroa/labeler#1051 parent 70ab081 commit c168993
1 file changed
+30
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
10 | 19 | | |
11 | 20 | | |
12 | 21 | | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
13 | 25 | | |
14 | 26 | | |
15 | 27 | | |
16 | 28 | | |
17 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
0 commit comments