blockera-folder-sync is a GitHub Action for syncing shared packages across multiple repositories. This is especially useful when you have shared packages or folders and need to ensure all dependent repositories are updated whenever changes are pushed to the master branch.
- Automatically sync shared packages across repositories.
- Triggered on changes to the master branch of the primary repository.
- Easily configurable with repository secrets for authentication.
Below is an example workflow configuration to sync shared packages with dependent repositories:
``name: Sync Packages to Other Repos
on: push: branches:
- master
jobs: sync-packages: name: Sync Packages to Other Repos runs-on: ubuntu-latest
steps:
- name: Checkout Primary Repo
uses: actions/checkout@v4
- name: Sync packages with other dependent repositories
uses: blockeraai/blockera-folder-sync@v1.0.0
with:
TOKEN: ${{ secrets.BLOCKERABOT_PAT }}
USERNAME: ${{ secrets.BLOCKERABOT_USERNAME }}
EMAIL: ${{ secrets.BLOCKERABOT_EMAIL }}``
| Name | Required | Description |
|---|---|---|
TOKEN |
Yes | Personal Access Token (PAT) for authentication. |
USERNAME |
Yes | Username of the bot or user performing the sync. |
EMAIL |
Yes | Email address for the bot or user performing the sync. |
-
Create a Personal Access Token (PAT): Go to your GitHub account settings and generate a PAT with the necessary repository permissions.
-
Add Secrets to Your Repository:
- Navigate to your repository Settings > Secrets and variables > Actions > New repository secret.
- Add the following secrets:
BLOCKERABOT_PAT- Your PAT.BLOCKERABOT_USERNAME- Your GitHub username.BLOCKERABOT_EMAIL- Your GitHub email.
-
Configure the Workflow:
- Copy the example workflow above into your
.github/workflows/sync-packages.ymlfile.
- Syncing shared libraries across microservices repositories.
- Propagating changes in a monorepo structure to other repositories.
This project is licensed under the MIT License.
We welcome contributions! Feel free to open issues or submit pull requests to improve this Action.