Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/frankdejonge/use-subsplit-publish
https://github.com/frankdejonge/use-subsplit-publish
Last synced: 3 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/frankdejonge/use-subsplit-publish
- Owner: frankdejonge
- Created: 2021-04-25T09:03:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-01T12:07:48.000Z (3 months ago)
- Last Synced: 2024-09-28T12:56:24.041Z (7 days ago)
- Language: TypeScript
- Size: 2.21 MB
- Stars: 35
- Watchers: 4
- Forks: 2
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Use Sub-split Publish Action
This action publishes a subsplit of the current repository
using the [splitsh-lite](https://github.com/splitsh/lite) tool.## Inputs
### `config-path`
**Required** The path for the sub-split JSON [config](#configuration).
### `splitsh-path`
**Required** The path to install splitsh-lite. You should add this path to the cache.
### `source-branch`
**Required** The source branch to split from. Example: `main`
### `origin-remote`
**Optional** The origin remote name. Default: `origin`
### `splitsh-version`
**Optional** Version of the splitsh-lite binary. Default `v1.0.1`
## Configuration
Sub-splits are configured using a JSON file. The location of the file
should match the path configured at `config-path`.Example:
```json
{
"sub-splits": [
{
"name": "workflows",
"directory": ".github/workflows",
"target": "[email protected]:frankdejonge/example-subsplit-publish.git"
}
]
}
```Each entry contains 3 keys:
* `name`: The name of the remote. Must be unique.
* `directory`: The directory to publish to the sub-split.
* `target`: The git URL to publish the sub-split to.## Example Workflow
```yaml
on:
push:
branches:
- mainjobs:
publis_sub_splits:
runs-on: ubuntu-latest
name: Publish Sub-split
steps:
- uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: 'false'
- uses: frankdejonge/[email protected]
with:
authentication: 'username:${{ secrets.PERSONAL_GITHUB_TOKEN }}'
user_name: 'Your Name'
user_email: '[email protected]'
- name: Cache splitsh-lite
id: splitsh-cache
uses: actions/cache@v2
with:
path: './.splitsh'
key: '${{ runner.os }}-splitsh-d-101'
- uses: frankdejonge/[email protected]
with:
source-branch: 'main'
config-path: './config.subsplit-publish.json'
splitsh-path: './.splitsh/splitsh-lite'
splitsh-version: 'v1.0.1'
```## Tag Management
This action propagated tags when it's configured in the action.
```yaml
on:
create:
tags:
- '*'
delete:
tags:
- '*'
```For each sub-split, the tags are propagated when the target commit hash has no prior tag.