🔄 GitHub Action to keep files like Action workflows or entire directories in sync between multiple repositories.
Go to file
2021-01-08 22:02:41 +01:00
.github 🙈 Don't version sync.yml 2021-01-08 22:02:41 +01:00
dist 🙈 Don't version sync.yml 2021-01-08 22:02:41 +01:00
src 🎉 Initial commit 2021-01-08 21:47:49 +01:00
.eslintrc.js 🎉 Initial commit 2021-01-08 21:47:49 +01:00
.gitignore 🙈 Don't version sync.yml 2021-01-08 22:02:41 +01:00
action.yml 🎉 Initial commit 2021-01-08 21:47:49 +01:00
CHANGELOG.md 🎉 Initial commit 2021-01-08 21:47:49 +01:00
LICENSE 🎉 Initial commit 2021-01-08 21:47:49 +01:00
package-lock.json 🎉 Initial commit 2021-01-08 21:47:49 +01:00
package.json 🎉 Initial commit 2021-01-08 21:47:49 +01:00
README.md 🎉 Initial commit 2021-01-08 21:47:49 +01:00
release.config.js 🎉 Initial commit 2021-01-08 21:47:49 +01:00

action-github-file-sync

🚧 UNDER DEVELOPMENT 🚧

Usage

Use the sync.yml file to specify which files should be synced to which repos.

The top-level key should be used to specify the target repository in the format username/repository-name@branch, after that you can list all the files you want to sync to that individual repository:

user/repo:
  - path/to/file.txt
user/repo2:
  - path/to/file2.txt

There are multiple ways to specify which files to sync to each individual repository.

List individual files

user/repo:
  - .github/workflows/build.yml
  - LICENSE
  - .gitignore

Different destination path/filename

user/repo:
  - source: workflows/build.yml
    dest: .github/workflows/build.yml
  - source: LICENSE.md
    dest: LICENSE

Sync entire directories (coming soon)

user/repo:
  - source: workflows/build.yml
    dest: .github/workflows/build.yml
  - source: LICENSE.md
    dest: LICENSE

Match files with regex pattern (coming soon)

user/repo:
  - pattern: |
      ^LICENSE$
      ^.github/workflows/sync-.*      

Don't replace existing file

user/repo:
  - source: .github/workflows/lint.yml
    replace: false

Don't delete non-existing file (coming soon)

user/repo:
  - source: .github/workflows/lint.yml
    delete: false

Sync the same files to multiple repositories

group:
  repos: |
    user/repo
    user/repo    
  files: 
    - source: workflows/build.yml
      dest: .github/workflows/build.yml
    - source: LICENSE.md
      dest: LICENSE