Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: trigger MAINTAINERS.yaml update for each CODEOWNERS file change #307

Merged
merged 4 commits into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion .github/workflows/global-replicator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,22 @@ jobs:
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
bot_branch_name: bot/update-files-from-global-repo

mszostok marked this conversation as resolved.
Show resolved Hide resolved
replicate_update_maintainers_workflow:
if: startsWith(github.repository, 'asyncapi/')
name: Replicate update-maintainers-trigger.yml workflow in the required repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating file
uses: derberg/manage-files-in-multiple-repositories@beecbe897cf5ed7f3de5a791a3f2d70102fe7c25
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/update-maintainers-trigger.yml
mszostok marked this conversation as resolved.
Show resolved Hide resolved
repos_to_ignore: community,shape-up-process
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update update-maintainers-trigger.yml workflow from global .github repo"
bot_branch_name: bot/update-files-from-global-repo
27 changes: 27 additions & 0 deletions .github/workflows/update-maintainers-trigger.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# This action is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo

name: Trigger MAINTAINERS.yaml file update

on:
push:
branches: [ master ]
paths:
# Check all valid CODEOWNERS locations:
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#codeowners-file-location
- 'CODEOWNERS'
- '.github/CODEOWNERS'
- '.docs/CODEOWNERS'

jobs:
trigger-maintainers-update:
name: Trigger updating MAINTAINERS.yaml because of CODEOWNERS change
runs-on: ubuntu-latest

steps:
- name: Repository Dispatch
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # https://github.com/peter-evans/repository-dispatch/releases/tag/v3.0.0
with:
# The PAT with the 'public_repo' scope is required
token: ${{ secrets.GH_TOKEN }}
event-type: trigger-maintainers-update
Loading