Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/connor-baer/action-sync-branch
GitHub Action to keep a branch in sync with the current branch
https://github.com/connor-baer/action-sync-branch
Last synced: 4 days ago
JSON representation
GitHub Action to keep a branch in sync with the current branch
- Host: GitHub
- URL: https://github.com/connor-baer/action-sync-branch
- Owner: connor-baer
- License: mit
- Created: 2021-10-12T08:46:50.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2024-11-02T08:38:07.000Z (18 days ago)
- Last Synced: 2024-11-04T14:45:49.300Z (16 days ago)
- Language: TypeScript
- Size: 1 MB
- Stars: 13
- Watchers: 4
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Sync Branch
GitHub Action to keep a branch in sync with the current branch
## Usage
Here's an example workflow that syncs a `test` branch every time a commit is pushed to the `main` branch:
```yml
name: Sync branchon:
push:
branches:
- mainjobs:
sync-branch:
name: Update test branch
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- uses: connor-baer/action-sync-branch@main
with:
branch: test
token: ${{ secrets.GITHUB_TOKEN }}
force: false
```## Inputs
### `branch`
**Required** The name of the branch to sync with the current branch.
### `token`
**Required** A GitHub token with permission to push to the repo. [Generate a new token](https://github.com/settings/tokens/new?description=Sync%20Branch&scopes=repo).
### `force`
Whether to force the update or to make sure the update is a fast-forward update. Leaving this out or setting it to `false` will make sure you're not overwriting work. Default: `false`.