Auto merge changes made to the target branches in a pull request #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto merge changes made to the target branches in a pull request | |
on: | |
workflow_dispatch: | |
inputs: | |
pr_number: | |
description: Pull request number | |
required: true | |
type: string | |
jobs: | |
sync-changes: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pull-requests: write | |
steps: | |
- name: Generate GitHub Auth Token | |
# https://github.com/tibdex/github-app-token | |
id: generate_token | |
uses: tibdex/[email protected] | |
with: | |
app_id: ${{ secrets.GH_APP_ID }} | |
private_key: ${{ secrets.GH_APP_PRIVATE_KEY }} | |
- name: Auto merge changes in the target PR | |
id: automerge | |
# https://github.com/pascalgn/automerge-action | |
uses: pascalgn/automerge-action@main | |
env: | |
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} | |
MERGE_LABELS: automerge | |
MERGE_REMOVE_LABELS: automerge | |
MERGE_METHOD: squash | |
MERGE_COMMIT_MESSAGE: "ci(github-action): auto merge ${{ inputs.pr_number }}" | |
MERGE_FORKS: false | |
MERGE_RETRIES: 0 | |
MERGE_RETRY_SLEEP: 0 | |
MERGE_REQUIRED_APPROVALS: 0 | |
BASE_BRANCHES: "unstable,experiment" | |
PULL_REQUEST: ${{ inputs.pr_number }} |