Repository navigation
341 lines (323 loc) · 16.9 KB
/
Copy pathglobal-replicator.yml
File metadata and controls
341 lines (323 loc) · 16.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
name: Global workflow to rule them all
# Triggers:
# - on push to master, if certain files are modified
# - manual trigger via workflow_dispatch, check in CODEOWNERS files who can trigger the workflow for you
on:
push:
branches: [master]
paths:
- ".github/workflows/**"
- "CODE_OF_CONDUCT.md"
- "CONTRIBUTING.md"
- "LICENSE"
- "NOTICE"
workflow_dispatch:
inputs:
repo_name:
description: |
You can specify the repository's name where workflows should be pushed manually, as long as workflow settings do not ignore the repository.
If you do not specify the exact repository name, the workflow will try to replicate all missing changes to all repositories.
type: string
required: false
permissions:
contents: read # Just to checkout the code
jobs:
# Synchronizes the CODE_OF_CONDUCT.md file across all AsyncAPI repositories.
# Ensures consistent community standards and behavior guidelines in every project
replicate_coc:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate Code of Conduct in all repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: CODE_OF_CONDUCT.md
repos_to_ignore: shape-up-process,glee-hello-world,saunter
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# Distributes the CONTRIBUTING.md guide to most AsyncAPI repositories.
# Helps contributors understand how to participate and follow consistent contribution processes.
replicate_contributing:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate CONTRIBUTING guide to all repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: CONTRIBUTING.md
repos_to_ignore: shape-up-process,glee-hello-world,spec,community,php-template,tck,modelina,dotnet-nats-template,ts-nats-template,extensions-catalog,saunter,website,generator
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# Adds or updates the Go-specific PR testing workflow (`if-go-pr-testing.yml`)
# to all repositories tagged with the `golang` topic, ensuring uniform CI behavior for Go projects.
replicate_go_workflows:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate workflows for Go projects
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/if-go-pr-testing.yml
topics_to_include: golang
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# Adds or updates the Node.js PR testing workflow (`if-nodejs-pr-testing.yml`)
# in all repositories tagged with the `nodejs` topic, enabling standardized testing setups.
replicate_nodejs_workflows:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate workflows for Nodejs projects
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/if-nodejs-pr-testing.yml
topics_to_include: nodejs
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# Syncs release workflows for Node.js projects, including semantic version bumping and publishing.
# Targets only repos marked with `get-global-node-release-workflows`.
replicate_nodejs_release_workflows:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate release workflows for Nodejs projects
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/if-nodejs-release.yml,.github/workflows/if-nodejs-version-bump.yml,.github/workflows/bump.yml
topics_to_include: get-global-node-release-workflows
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# release config file must be managed separately
# some projects may still use GH Action workflow for releases, but with different semantic-release config
# Ensures the presence of a consistent `.releaserc` config file for semantic-release
# in repositories tagged with `get-global-releaserc`.
replicate_semantic_release_config:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate .releaserc file
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/.releaserc
topics_to_include: get-global-releaserc
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
destination: ./
bot_branch_name: bot/update-files-from-global-repo
# Syncs reusable, general-purpose workflows (e.g., automerge, labeling, shared scripts).
# Excludes certain repos to avoid unnecessary duplication or conflicts.
replicate_generic_workflows:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate generic workflows and scripts needed for any project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/scripts,.github/workflows/automerge-for-humans-add-ready-to-merge-or-do-not-merge-label.yml,.github/workflows/add-good-first-issue-labels.yml,.github/workflows/automerge-for-humans-merging.yml,.github/workflows/automerge-for-humans-remove-ready-to-merge-label-on-edit.yml,.github/workflows/automerge-orphans.yml,.github/workflows/automerge.yml,.github/workflows/autoupdate.yml,.github/workflows/help-command.yml,.github/workflows/issues-prs-notifications.yml,.github/workflows/lint-pr-title.yml,.github/workflows/notify-tsc-members-mention.yml,.github/workflows/stale-issues-prs.yml,.github/workflows/welcome-first-time-contrib.yml,.github/workflows/release-announcements.yml,.github/workflows/microgrant-program-commands.yml,.github/workflows/please-take-a-look-command.yml,.github/workflows/update-pr.yml,.github/workflows/transfer-issue.yml
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
repos_to_ignore: shape-up-process,glee-hello-world,saunter
bot_branch_name: bot/update-files-from-global-repo
# Applies Docker-related PR test workflows (`if-docker-pr-testing.yml`)
# to all repositories tagged with the `docker` topic for consistent CI.
replicate_docker_workflows:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate Docker workflows needed for any project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
topics_to_include: docker
patterns_to_include: .github/workflows/if-docker-pr-testing.yml
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# Adds workflow schema validation to all repos tagged with `get-workflows-validation`.
# Helps catch structural issues in GitHub workflow YAML files.
replicate_validate_workflow_schema:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate workflow schema validation to repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/validate-workflow-schema.yml
topics_to_include: get-workflows-validation
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# Adds the `update-docs.yml` workflow to projects tagged with `get-update-docs`.
# Automates documentation updates, typically after releases or content changes.
replicate_docs_workflow:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate update-docs workflow to repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/update-docs-on-docs-commits.yml
topics_to_include: get-global-docs-autoupdate
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update of files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo/${{ github.job }}
# Syncs the `.prettierignore` file across all repositories tagged with `get-global-prettierignore`.
# Ensures consistent formatting exclusions and Prettier behavior in all relevant projects.
replicate_prettierignore_file:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate .prettierignore file in the required repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .prettierignore
topics_to_include: get-global-prettierignore
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update .prettierignore from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
destination: ./
# Distributes the `update-maintainers-trigger.yaml` workflow to most AsyncAPI repositories.
# This workflow is mandatory (non-optional) and used to update maintainer lists across the org.
# Some repos like `community` are excluded because they implement their own version of the workflow.
replicate_update_maintainers_workflow:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate update-maintainers-trigger.yaml workflow in the required repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/update-maintainers-trigger.yaml
repos_to_ignore: community,shape-up-process # community repo is ignored as it has its own version of this workflow, version that is triggered by this workflow
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update update-maintainers-trigger.yaml workflow from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# The holopin.yml file is replicated from the global .github repository to ensure consistency across all repositories.
# This file is used to manage Holopin badge configurations for contributors, maintainers, and other roles in the organization.
replicate_holopin_file:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate holopin.yml file to repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating holopin.yml file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/holopin.yml
topics_to_include: get-global-holopin
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update holopin.yml from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
# The License and Notice files are replicated from the global .github repository to ensure consistency across all repositories.
# These files are crucial for legal compliance and inform users about the licensing terms of the codebase.
replicate_license_and_notice_files:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate LICENSE and NOTICE files to repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: Replicating LICENSE and NOTICE files
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25 # v2
with:
github_token: ${{ secrets.GH_TOKEN }}
repos_to_ignore: community,brand
patterns_to_include: LICENSE, NOTICE
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update LICENSE and NOTICE files from global .github repo"
bot_branch_name: bot/update-files-from-global-repo