-
Notifications
You must be signed in to change notification settings - Fork 1
26 lines (25 loc) · 1.06 KB
/
automerge.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
# ~~ Generated by projen. To modify, edit .projenrc.js and run "npx projen".
name: automerge
on:
pull_request_target:
types:
- opened
- labeled
- ready_for_review
- reopened
- synchronize
concurrency: ${{ github.workflow }}-${{ github.head_ref }}
jobs:
automerge:
runs-on: ubuntu-latest
permissions:
contents: read
if: contains(github.event.pull_request.labels.*.name, 'automerge') && !contains(github.event.pull_request.labels.*.name, 'do-not-merge') && github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- name: Turn on automerge for this PR by a trusted user or bot
if: github.event.pull_request.user.login == 'team-tf-cdk' || contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'), github.event.pull_request.author_association) || github.actor == 'dependabot[bot]'
env:
GH_TOKEN: ${{ secrets.PROJEN_GITHUB_TOKEN }}
run: gh pr merge --auto --squash ${{ github.event.pull_request.number }}