Skip to content

Commit 072b86b

Browse files
alan-agius4josephperrott
authored andcommitted
ci: add stale PR cleanup action
Add the stale_pr_cleanup job to the org-wide-actions.yml workflow. This job uses the stale-cleanup local action to clean up stale PRs. Also, refactor the file to use a workflow-level environment variable REPOS for the list of repositories to reduce duplication across jobs.
1 parent 8bb0c36 commit 072b86b

1 file changed

Lines changed: 19 additions & 10 deletions

File tree

.github/workflows/org-wide-actions.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ on:
99
permissions:
1010
contents: read
1111

12+
env:
13+
REPOS: |
14+
dev-infra
15+
angular
16+
angular-cli
17+
components
18+
1219
jobs:
1320
labels_sync:
1421
if: github.repository == 'angular/dev-infra'
@@ -18,11 +25,7 @@ jobs:
1825
- uses: ./.github/local-actions/labels-sync
1926
with:
2027
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
21-
repos: |
22-
dev-infra
23-
angular
24-
angular-cli
25-
components
28+
repos: ${{ env.REPOS }}
2629

2730
lock_closed:
2831
if: github.repository == 'angular/dev-infra'
@@ -32,8 +35,14 @@ jobs:
3235
- uses: ./.github/local-actions/lock-closed
3336
with:
3437
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
35-
repos: |
36-
dev-infra
37-
angular
38-
angular-cli
39-
components
38+
repos: ${{ env.REPOS }}
39+
40+
stale_pr_cleanup:
41+
if: github.repository == 'angular/dev-infra'
42+
runs-on: ubuntu-latest
43+
steps:
44+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
45+
- uses: ./.github/local-actions/stale-cleanup
46+
with:
47+
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
48+
repos: ${{ env.REPOS }}

0 commit comments

Comments
 (0)