Skip to content

Commit c6afab0

Browse files
committed
Sync trigger-all-repos.yml from .github repo
1 parent 3f0ee3d commit c6afab0

File tree

1 file changed

+2
-53
lines changed

1 file changed

+2
-53
lines changed
Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,63 @@
1-
name: Trigger Workflow on All Repos
1+
name: "Trigger Workflow on All Repos"
22

33
on:
4-
54
workflow_dispatch:
6-
75
inputs:
8-
96
workflow_file:
10-
117
description: 'Workflow file name to trigger (e.g., workflows-sync.yml)'
12-
138
required: true
14-
159
type: string
16-
1710
ref:
18-
1911
description: 'Git reference (branch/tag/SHA) to run workflow from'
20-
2112
required: false
22-
2313
default: 'main'
24-
2514
type: string
26-
2715
include_archived:
28-
2916
description: 'Include archived repositories'
30-
3117
required: false
32-
3318
default: false
34-
3519
type: boolean
36-
3720
check_only:
38-
3921
description: 'Only check which repos have the workflow (do not trigger)'
40-
4122
required: false
42-
4323
default: false
44-
4524
type: boolean
4625

4726
jobs:
48-
4927
trigger-all:
50-
51-
runs-on: self-hosted
52-
28+
runs-on: [self-hosted, linux, x64, big]
5329
steps:
54-
5530
- name: Checkout repository
56-
5731
uses: actions/checkout@main
5832

5933
- name: Set up Python
60-
6134
uses: actions/setup-python@main
62-
6335
with:
64-
6536
python-version: '3.11'
6637

6738
- name: Install dependencies
68-
6939
run: |
70-
7140
pip install requests
7241
7342
- name: Trigger workflow on all repositories
74-
7543
env:
76-
7744
GITHUB_TOKEN: ${{ secrets.GH_PAT }}
78-
7945
run: |
80-
8146
python trigger_workflow_all_repos.py \
82-
8347
P4X-ng \
84-
8548
"${{ inputs.workflow_file }}" \
86-
8749
--ref "${{ inputs.ref }}" \
88-
8950
${{ inputs.include_archived && '--include-archived' || '' }} \
90-
9151
${{ inputs.check_only && '--check-only' || '' }} \
92-
9352
--delay 1.5
9453
9554
- name: Summary
96-
9755
run: |
98-
9956
echo "## Workflow Dispatch Summary" >> $GITHUB_STEP_SUMMARY
100-
10157
echo "" >> $GITHUB_STEP_SUMMARY
102-
10358
echo "**Workflow:** ${{ inputs.workflow_file }}" >> $GITHUB_STEP_SUMMARY
104-
10559
echo "**Reference:** ${{ inputs.ref }}" >> $GITHUB_STEP_SUMMARY
106-
10760
echo "**Include archived:** ${{ inputs.include_archived }}" >> $GITHUB_STEP_SUMMARY
108-
10961
echo "**Check only:** ${{ inputs.check_only }}" >> $GITHUB_STEP_SUMMARY
110-
11162
echo "" >> $GITHUB_STEP_SUMMARY
112-
11363
echo "See logs above for detailed results." >> $GITHUB_STEP_SUMMARY
114-

0 commit comments

Comments
 (0)