Kopier is a Github Action made to generate/copy files across multiple repositories. The software is inspired initially by Copybara and a continuation of Tabetalt's Kopier.
- Copy files to multiple repositories.
- Generate files (such as Github Actions files) with a Handlebarsjs.
- When templates or files are changed, you can create a pull request for each repository.
Kopier was made to make it easier to handle repeatable tasks when working with a multi-repository setup. In our case, we work with many microservices separated in multiple repositories. We want to make sure we are running the same Github Actions workflow for each, but there are differences, like the name etc.
jobs:
build:
steps:
- uses: bjerkio/kopier@main
with:
query: 'org:bjerkio'
Github Token must be a personal one, not {{ secret.GITHUB_TOKEN }}! We recommend using a service account GitHub profile, like @bjerk-bot
Search for repositories you want to query. Learn how to search for repositories on Github Docs.
Note: You cannot combine query
with repos
.
List of repositories to add files to.
Example:
steps:
- uses: bjerkio/kopier@main
with:
repos: |
bjerkio/kopier
bjerkio/oidc-react
Base path for in the repositories, e.g. .github/workflows
.
Default is templates/
.
Commit message.
Default is chore(kopier): {{commit.subject}}
.
Pull Request title.
Default is chore(kopier): {{commit.subject}}
.
Pull Request body.
Default is found in src/pr-message.ts.
A branch name for updates.
Default is kopier-{{ commit sha }}
.
Base-branch is where the pull request is opened.
Defaults to default branch
Apart from this README, you can find details and examples of using the SDK in the following places:
Feel free to open issues and pull requests. We appreciate all the help we can get! ๐