Thanks to visit codestin.com
Credit goes to github.com

Skip to content

STUDITEMPS/action-sync-branch

 
 

Repository files navigation

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:

name: Sync branch

on:
  push:
    branches:
      - main

permissions:
  contents: write

jobs:
  sync-branch:
    name: Update test branch
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v6

      - uses: connor-baer/action-sync-branch@v2
        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.

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.

About

GitHub Action to keep a branch in sync with the current branch

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 59.2%
  • JavaScript 40.8%