AUTO: chore: Fix permission for cherry-pick job #7
Workflow file for this run
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 flagged PR | |
on: | |
pull_request: | |
types: ['labeled'] | |
permissions: | |
pull-requests: write | |
contents: write | |
## This job will auto merge PR that has been labeled with 'auto-merge' | |
jobs: | |
activate-auto-merge: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.label.name == 'auto-merge' }} | |
steps: | |
- name: Approve PR | |
run: gh pr review --approve "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.WEBTEAM_AUTOMERGE_TOKEN}} | |
- name: Enable auto-merge | |
run: gh pr merge --auto --squash "$PR_URL" | |
env: | |
PR_URL: ${{github.event.pull_request.html_url}} | |
GITHUB_TOKEN: ${{secrets.WEBTEAM_AUTOMERGE_TOKEN}} |