Skip to content

🔀 Synchronise branches using Git merge with a (recursive) strategy

License

Notifications You must be signed in to change notification settings

prompt/actions-merge-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

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merge Into Current Branch

A GitHub Action for keeping two branches in sync by merging in any source branch changes using git locally -- not the GitHub API.

prompt/actions-merge-branch@v2

Inputs

ID Description Default Examples
from Branch to merge into the current branch required main
author Merge commit author GitHub Actions[1] Alice <alice@example.com>
strategy Merge strategy with options recursive -Xtheirs recursive
recursive -Xours
commit Commit changes? true true false
push Push merge commit to origin? true true false

[1] github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

Outputs

No outputs.

Examples

Synchronise release branch with main

Every push to main is synchronised to the release branch by merging in any changes.

on:
  push:
    branches:
      - "main"

jobs:
  synchronise-release:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
        with:
          ref: "release"
          fetch-depth: 0
      - uses: prompt/actions-merge-branch@v2
        with:
          from: "origin/main"