Commit 098a432
authored
ci: use GitHub App token for workflows that open PRs and push commits (#1174)
* ci: use GitHub App token for workflows that open PRs and push commits
Workflows triggered by GITHUB_TOKEN do not start downstream workflow
runs, so the PRs opened by the daily metadata and catalog-data jobs,
and the auto-update commits pushed onto contributor PR branches by
update-tools, were landing without CI runs.
Switch to a GitHub App installation token (the same RELEASE_APP_*
pattern already used in toolhive-registry-server) for the steps that
open PRs or push commits, so CI runs as expected.
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
* ci: tighten app token usage (perms, concurrency, bot identity)
- Scope the minted installation token to only contents:write and
pull_requests:write via permission-* inputs, instead of inheriting
the full set of permissions the GitHub App has on the installation.
- Move workflow-level permissions on update-metadata.yml to the job
level, leaving the workflow with permissions: {}.
- Add a concurrency group to update-metadata.yml (workflow-level) and
to ci.yml's update-catalog-data job, so overlapping schedule and
workflow_dispatch runs cannot race on the force-pushed branch.
- Set git author/committer to the App's bot identity
(<id>+<app-slug>[bot]@users.noreply.github.com) in all three jobs
that commit, so commits are unambiguously attributed and can be
targeted by branch-protection rules.
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>
---------
Signed-off-by: Radoslav Dimitrov <radoslav@stacklok.com>1 parent 7940114 commit 098a432
3 files changed
Lines changed: 84 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
80 | 83 | | |
81 | 84 | | |
82 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
83 | 104 | | |
84 | 105 | | |
| 106 | + | |
| 107 | + | |
85 | 108 | | |
86 | 109 | | |
87 | 110 | | |
| |||
111 | 134 | | |
112 | 135 | | |
113 | 136 | | |
114 | | - | |
115 | | - | |
| 137 | + | |
| 138 | + | |
116 | 139 | | |
117 | 140 | | |
118 | 141 | | |
| |||
162 | 185 | | |
163 | 186 | | |
164 | 187 | | |
165 | | - | |
| 188 | + | |
166 | 189 | | |
| 190 | + | |
| 191 | + | |
167 | 192 | | |
168 | 193 | | |
169 | 194 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | | - | |
17 | | - | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
18 | 20 | | |
19 | 21 | | |
20 | 22 | | |
21 | 23 | | |
22 | 24 | | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
23 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
24 | 47 | | |
25 | 48 | | |
26 | 49 | | |
27 | | - | |
| 50 | + | |
28 | 51 | | |
29 | 52 | | |
30 | 53 | | |
| |||
42 | 65 | | |
43 | 66 | | |
44 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
45 | 71 | | |
46 | 72 | | |
47 | 73 | | |
48 | | - | |
49 | | - | |
| 74 | + | |
| 75 | + | |
50 | 76 | | |
51 | 77 | | |
52 | 78 | | |
| |||
118 | 144 | | |
119 | 145 | | |
120 | 146 | | |
121 | | - | |
| 147 | + | |
122 | 148 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
351 | 351 | | |
352 | 352 | | |
353 | 353 | | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
354 | 372 | | |
355 | 373 | | |
356 | 374 | | |
357 | | - | |
| 375 | + | |
358 | 376 | | |
359 | 377 | | |
360 | 378 | | |
| |||
379 | 397 | | |
380 | 398 | | |
381 | 399 | | |
382 | | - | |
383 | | - | |
| 400 | + | |
| 401 | + | |
384 | 402 | | |
385 | 403 | | |
386 | 404 | | |
| |||
436 | 454 | | |
437 | 455 | | |
438 | 456 | | |
| 457 | + | |
| 458 | + | |
439 | 459 | | |
440 | 460 | | |
441 | 461 | | |
| |||
0 commit comments