🤖 Sync local branches 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: devSync staging with production branch:
- uses: remarkablemark/sync-branch@v1
with:
base: staging
head: productionSee action.yml
Required: The base branch.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branchOptional: 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-branchOptional: The merge method (merge, squash, rebase). Defaults to merge.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
merge: squashOptional: The pull request title.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
title: My PR titleOptional: The pull request body.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
body: My PR bodyOptional: Delete the local and remote branch after merge. Defaults to false.
- uses: remarkablemark/sync-branch@v1
with:
base: my-base-branch
delete-branch: trueOptional: 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 }}