File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -40,13 +40,23 @@ jobs:
4040 git config --global user.name 'googlemaps-bot'
4141 git config --global user.email 'googlemaps-bot@google.com'
4242
43- - name : Create Pull Request
43+ - name : Create Pull Request, Approve, and Enable Auto-Merge
4444 run : |
45- gh pr create \
45+ PR_URL=$( gh pr create \
4646 --base main \
4747 --head temp-build-branch \
4848 --title "chore: automated output update (dist)" \
4949 --body "This PR contains updated build output from the dist branch." \
50- --label "automated pr,dist-update"
50+ --label "automated pr,dist-update")
51+
52+ echo "PR created at $PR_URL"
53+
54+ # Approve the PR using the Approver Token
55+ GH_TOKEN=${{ secrets.GH_APPROVER_TOKEN }} gh pr review --approve "$PR_URL"
56+ echo "PR approved."
57+
58+ # Enable auto-merge using the Merge Token
59+ gh pr merge --auto --merge "$PR_URL"
60+ echo "Auto-merge enabled."
5161 env :
5262 GH_TOKEN : ${{ secrets.GH_MERGE_TOKEN }}
You can’t perform that action at this time.
0 commit comments