Skip to content

Commit

Permalink
ci: use latest action to replicate workflows to other repos (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
derberg authored Apr 12, 2022
1 parent 763dfd9 commit 31b9746
Show file tree
Hide file tree
Showing 2 changed files with 98 additions and 34 deletions.
98 changes: 98 additions & 0 deletions .github/workflows/global-replicator.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
name: Global workflow to rule them all

on:
push:
branches: [ master ]
paths:
- '.github/workflows/**'
- 'CODE_OF_CONDUCT.md'
- 'CONTRIBUTING.md'
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_coc:
name: Replicate Code of Conduct in all repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Replicating file
uses: derberg/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: CODE_OF_CONDUCT.md
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "chore: update code of conduct"
repos_to_ignore: shape-up-process,glee-hello-world

replicate_contributing:
name: Replicate CONTRIBUTING guide to all repositories
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Replicating file
uses: derberg/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: CONTRIBUTING.md
repos_to_ignore: shape-up-process,glee-hello-world,spec,community,asyncapi-php-template,tck,modelina,dotnet-nats-template,ts-nats-template
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update global contribution guide"

replicate_go_workflows:
name: Replicate workflows for Go projects
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Replicating file
uses: derberg/[email protected]
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 workflows for go projects"

replicate_nodejs_workflows:
name: Replicate workflows for Nodejs projects
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Replicating file
uses: derberg/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .github/workflows/if-nodejs-pr-testing.yml,.github/workflows/if-nodejs-release.yml,.github/workflows/if-nodejs-version-bump.yml,.github/workflows/bump.yml
topics_to_include: nodejs
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update workflows for nodejs projects"

replicate_generic_workflows:
name: Replicate generic workflows needed for any project
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Replicating file
uses: derberg/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
patterns_to_include: .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/sentiment-analysis.yml,.github/workflows/stale-issues-prs.yml,.github/workflows/welcome-first-time-contrib.yml,.github/workflows/release-announcements.yml,.github/workflows/link-check-cron.yml,.github/workflows/link-check-pr.yml
committer_username: asyncapi-bot
committer_email: [email protected]
commit_message: "ci: update generic workflows"
repos_to_ignore: shape-up-process,glee-hello-world
34 changes: 0 additions & 34 deletions .github/workflows/global-workflows-support.yml

This file was deleted.

0 comments on commit 31b9746

Please sign in to comment.