Skip to content

Commit

Permalink
chore: add automerge workflow to this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
xiehan committed Dec 13, 2023
1 parent ee66736 commit 8e003dc
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/automerge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: automerge
on:
pull_request_target:
types:
- opened
- labeled
- ready_for_review
- reopened
- synchronize
concurrency: ${{ github.workflow }}-${{ github.ref }}
jobs:
automerge:
runs-on: ubuntu-latest
permissions:
contents: read
if: contains(github.event.pull_request.labels.*.name, 'automerge') && github.event.pull_request.draft == false
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- 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.GH_COMMENT_TOKEN }}
run: gh pr merge --auto --squash ${{ github.event.pull_request.number }

0 comments on commit 8e003dc

Please sign in to comment.