-
Notifications
You must be signed in to change notification settings - Fork 9
41 lines (38 loc) · 1.25 KB
/
automerge-sync-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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 }}