Skip to content

remarkablemark/sync-branch

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sync-branch

version test License: 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:

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

Basic:

- uses: remarkablemark/sync-branch@v1
  with:
    base: my-base-branch

Inputs

base

Required: The base branch.

- 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).

- 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.

- uses: remarkablemark/sync-branch@v1
  with:
    base: my-base-branch
    merge: squash

title

Optional: The pull request title.

- uses: remarkablemark/sync-branch@v1
  with:
    base: my-base-branch
    title: My PR title

body

Optional: The pull request body.

- 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.

- 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.

- uses: remarkablemark/sync-branch@v1
  with:
    base: my-base-branch
    admin: true
    token: ${{ secrets.PAT }}

Note

The token input must be set for admin to work.

token

Optional: The GitHub token.

- uses: remarkablemark/sync-branch@v1
  with:
    base: my-base-branch
    token: ${{ secrets.GITHUB_TOKEN }}

Examples

Contributions

Contributions are welcome!

License

MIT