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 github github-actions sync sync-branches
Last synced: 13 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 (9 months ago)
- Default Branch: master
- Last Pushed: 2024-02-14T22:44:28.000Z (9 months ago)
- Last Synced: 2024-10-11T15:13:23.103Z (about 1 month ago)
- Topics: actions, branch, github, github-actions, sync, sync-branches
- Homepage: https://github.com/marketplace/actions/sync-branch-github-action
- Size: 34.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# sync-branch
[![version](https://badgen.net/github/release/remarkablemark/sync-branch)](https://github.com/remarkablemark/sync-branch/releases)
[![test](https://github.com/remarkablemark/sync-branch/actions/workflows/test.yml/badge.svg)](https://github.com/remarkablemark/sync-branch/actions/workflows/test.yml)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)🤖 Sync branch with GitHub Actions.
> [!NOTE]
> To use this action, make sure to enable **Settings** > **Actions** > **General** > **Workflow permissions**:
> - **Read and write permissions**
> - **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)
## Contributions
Contributions are welcome!
## License
[MIT](LICENSE)