🤖 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
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
See action.yml
Basic:
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
Required: The base branch.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
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
Optional: The merge method (merge
, squash
, rebase
). Defaults to merge
.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
merge: squash
Optional: The pull request title.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
title: My PR title
Optional: The pull request body.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
body: My PR body
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
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.
Optional: The GitHub token.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
token: ${{ secrets.GITHUB_TOKEN }}
Contributions are welcome!