Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prompt/actions-merge-branch
:twisted_rightwards_arrows: Synchronise branches using Git merge with a (recursive) strategy
https://github.com/prompt/actions-merge-branch
actions git github-actions
Last synced: about 1 month ago
JSON representation
:twisted_rightwards_arrows: Synchronise branches using Git merge with a (recursive) strategy
- Host: GitHub
- URL: https://github.com/prompt/actions-merge-branch
- Owner: prompt
- License: mit
- Created: 2021-06-13T15:37:12.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-11T19:03:19.000Z (over 1 year ago)
- Last Synced: 2024-12-12T20:29:59.158Z (about 2 months ago)
- Topics: actions, git, github-actions
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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 ` |
| `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>`][users/github-actions]
## Outputs
No outputs.
## Examples
### Synchronise `release` branch with `main`
Every push to `main` is synchronised to the `release` branch by merging in any
changes.```yaml
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"
```[users/github-actions]: https://api.github.com/users/github-actions%5Bbot%5D