Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/acrobat/subtree-splitter
A Github action to synchronize a monolithic repository to standalone repositories by using splitsh-lite.
https://github.com/acrobat/subtree-splitter
github-actions opensource-management publishing splitsh splitsh-lite subtree-split
Last synced: 10 days ago
JSON representation
A Github action to synchronize a monolithic repository to standalone repositories by using splitsh-lite.
- Host: GitHub
- URL: https://github.com/acrobat/subtree-splitter
- Owner: acrobat
- License: mit
- Created: 2021-08-12T20:30:34.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-09-25T17:27:25.000Z (about 1 month ago)
- Last Synced: 2024-10-26T10:54:59.055Z (12 days ago)
- Topics: github-actions, opensource-management, publishing, splitsh, splitsh-lite, subtree-split
- Language: TypeScript
- Homepage:
- Size: 246 KB
- Stars: 9
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# subtree-splitter action
This actions synchronizes a monolithic repository to standalone repositories by using [splitsh-lite](https://github.com/splitsh/lite).
## Usage
### Inputs
> Specify using `with` keyword
* `config-path` - **(Required)** Location of the subtree split mapping configuration
* `batch-size` - How many subtreesplits should be processed in parallel. It is recommended to keep this amount low (or even at 1) for large repositories.### Example workflow
#### Configuration
Create a configuration file with the mapping of the different subtree splits. Each subtree split item contains a name (must be unique),
directory in the current repository and a target git repository.```json
{
"subtree-splits": [
{
"name": "core",
"directory": "src/Core",
"target": "[email protected]:example/core-package.git"
}
]
}```
#### Workflow
Example workflow to sync commits and tags.
```yaml
on:
push:
# Only trigger for specific branches or changes in specific paths.
branches:
- '*'
paths:
- src/**
# Tag push events should be ignored, they will be handled with the create event below.
tags-ignore:
- '*'
create:
tags:
- '*'
delete:
tags:
- '*'jobs:
sync_commits:
runs-on: ubuntu-latest
name: Sync commits
if: github.repository == 'your-org/your-repository' # Execute this workflow job only on the main repository.
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0# Add a personal access token to the repository secrets. This will allow the splitter action to push the new commits
- uses: frankdejonge/[email protected]
with:
authentication: 'username:${{ secrets.PERSONAL_GITHUB_TOKEN }}'
user_name: 'Committer name'
user_email: 'Committer email'# Cache the splitsh executable to speedup future runs
- name: Cache splitsh-lite
uses: actions/cache@v2
with:
path: './splitsh'
key: '${{ runner.os }}-splitsh-v101'# Sync commits and tags for the configured subtree splits
- name: subtree split
uses: acrobat/[email protected]
with:
config-path: .github/subtree-splitter-config.json # Reference the location where you saved your config file
```