Skip to content

Global replicator

Global replicator #331

---
# This workflow does not need to be replicated to other repositories. This workflow will update the files in other org
# repos.
name: Global replicator
on:
push:
branches: [master] # only files that changed in the commit will be replicated, unless using `workflow_dispatch`
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.
required: false
jobs:
replicate:
runs-on: ubuntu-latest
name: Replicate files
env:
BOT_BRANCH_NAME: 'bot/update-files-from-global-repo'
COMMIT_MESSAGE: 'chore: update global workflows'
REPOS_TO_IGNORE: >-
homebrew-core,
winget-pkgs,
Virtual-Gamepad-Emulation-Bus,
Virtual-Gamepad-Emulation-Client,
Virtual-Gamepad-Emulation-dotnet
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Removing files
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_remove: >-
.github/pr_release_template.md,
.github/workflows/auto-create-pr.yml,
.github/workflows/automerge.yml,
.github/workflows/autoupdate.yml,
.github/workflows/autoupdate-labeler.yml,
.github/workflows/ci-qodana.yml,
.github/workflows/cpp-lint.yml,
.github/workflows/dispatcher.yml,
.github/workflows/issues-stale.yml,
.github/workflows/pull-requests.yml,
.github/workflows/python-flake8.yml,
.github/workflows/yaml-lint.yml,
qodana-dotnet.yaml,
qodana-js.yaml,
qodana-python.yaml
topics_to_include: ''
exclude_private: false
exclude_forked: false
destination: ''
# checkout between each step to ensure we have a clean GitHub workspace
# see https://github.com/derberg/manage-files-in-multiple-repositories/issues/61#issuecomment-1747013728
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (general)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.github/dependabot.yml,
.github/label-actions.yml,
.github/pr_release_template.md,
.github/semantic.yml,
.github/workflows/auto-create-pr.yml,
.github/workflows/automerge.yml,
.github/workflows/autoupdate.yml,
.github/workflows/autoupdate-labeler.yml,
.github/workflows/codeql.yml,
.github/workflows/common-lint.yml,
.github/workflows/issues.yml
topics_to_include: ''
exclude_private: false
exclude_forked: false
destination: ''
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (docs)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.github/workflows/update-docs.yml
topics_to_include: 'rtd'
exclude_private: false
exclude_forked: false
destination: ''
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (python)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.flake8
topics_to_include: 'python'
exclude_private: false
exclude_forked: false
destination: ''
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (docker)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.github/workflows/ci-docker.yml
topics_to_include: 'docker'
exclude_private: false
exclude_forked: false
destination: ''
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (c, cpp)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.clang-format
topics_to_include: 'c,cpp'
exclude_private: false
exclude_forked: false
destination: ''
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (custom issues)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.github/ISSUE_TEMPLATE/config.yml
topics_to_include: 'replicator-custom-issues'
exclude_private: false
exclude_forked: false
destination: ''
- name: Checkout repository
uses: actions/checkout@v4
- name: Replicating files (release/changelog workflows)
uses: derberg/manage-files-in-multiple-repositories@v2.1.0
with:
bot_branch_name: ${{ env.BOT_BRANCH_NAME }}
commit_message: ${{ env.COMMIT_MESSAGE }}
repos_to_ignore: ${{ env.REPOS_TO_IGNORE }}
github_token: ${{ secrets.GH_BOT_TOKEN }}
committer_username: ${{ secrets.GH_BOT_NAME }}
committer_email: ${{ secrets.GH_BOT_EMAIL }}
patterns_to_ignore: ''
patterns_to_include: >-
.github/workflows/release-notifier.yml,
.github/workflows/update-changelog.yml
topics_to_include: 'replicator-release-notifications'
exclude_private: false
exclude_forked: false
destination: ''