feat(ci): create file sync and auto merge bot workflows #4
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
# DO NOT EDIT DIRECTLY | |
# EDIT TEMPLATE IN ROLLKIT/.GITHUB REPO | |
name: Approve and Merge Bot PRs | |
on: | |
pull_request: | |
jobs: | |
dependabot: | |
name: "Approve and Merge Dependabot PRs" | |
if: ${{ github.actor == 'dependabot[bot]' }} | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: RollkitBot Approval | |
run: | | |
gh auth login --with-token <<< "$PAT" | |
gh pr review --approve "$PR_URL" | |
gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
PAT: ${{secrets.PR_APPROVE_PAT_RB}} | |
- name: Sevey Approval | |
run: | | |
gh auth login --with-token <<< "$PAT" | |
gh pr review --approve "$PR_URL" | |
gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
PAT: ${{secrets.PR_APPROVE_PAT_SEVEY}} | |
rollkitbot: | |
name: "Approve and Merge RollkitBot PRs" | |
if: ${{ github.actor == 'RollkitBot' && contains(github.event.pull_request.labels.*.name, 'action sync') }} | |
runs-on: ubuntu-latest | |
permissions: | |
pull-requests: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Sevey Approval | |
run: | | |
gh auth login --with-token <<< "$PAT" | |
gh pr review --approve "$PR_URL" | |
gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
PAT: ${{secrets.PR_APPROVE_PAT_SEVEY}} | |