Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/remarkablemark/sync-branch
🤖 Sync branch with GitHub Actions.
https://github.com/remarkablemark/sync-branch
actions branch composite github github-actions sync sync-branches
Last synced: 6 days ago
JSON representation
🤖 Sync branch with GitHub Actions.
- Host: GitHub
- URL: https://github.com/remarkablemark/sync-branch
- Owner: remarkablemark
- License: mit
- Created: 2024-02-11T22:33:41.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-02-12T06:01:21.000Z (8 days ago)
- Last Synced: 2025-02-12T07:19:42.307Z (8 days ago)
- Topics: actions, branch, composite, github, github-actions, sync, sync-branches
- Homepage: https://github.com/marketplace/actions/sync-branch-github-action
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# sync-branch
[](https://github.com/remarkablemark/sync-branch/releases)
[](https://github.com/remarkablemark/sync-branch/actions/workflows/test.yml)
[](https://opensource.org/licenses/MIT)🤖 Sync branch with GitHub Actions.
> [!NOTE]
> To use this action, make sure to enable **Settings** > **Actions** > **General** > **Workflow permissions**:
> - [x] **Read and write permissions**
> - [x] **Allow GitHub Actions to create and approve pull requests**## Quick Start
Merge `master` to `dev`:
```yaml
on:
push:
branches:
- master
jobs:
sync-branch:
runs-on: ubuntu-latest
steps:
- name: Sync Branch
uses: remarkablemark/sync-branch@v1
with:
base: dev
```## Usage
See [action.yml](action.yml)
**Basic:**
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
```## Inputs
### `base`
**Required**: The base branch.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
```### `head`
**Optional**: The head branch. Defaults to the repository default branch (e.g., `master` or `main`).
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
head: my-head-branch
```### `merge`
**Optional**: The merge method (`merge`, `squash`, `rebase`). Defaults to `merge`.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
merge: squash
```### `title`
**Optional**: The pull request title.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
title: My PR title
```### `body`
**Optional**: The pull request body.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
body: My PR body
```### `delete-branch`
**Optional**: Delete the local and remote branch after merge. Defaults to `false`.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
delete-branch: true
```### `admin`
**Optional**: Use administrator privileges to merge a pull request that does not meet requirements. Defaults to `false`.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
admin: true
token: ${{ secrets.PAT }}
```> [!NOTE]
> The [`token`](https://docs.github.com/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens) input must be set for `admin` to work.### `token`
**Optional**: The GitHub token.
```yaml
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
token: ${{ secrets.GITHUB_TOKEN }}
```## Examples
- [remarkablemark/sync-branch-demo](https://github.com/remarkablemark/sync-branch-demo)
## License
[MIT](LICENSE)