Skip to content

Commit b4afc33

Browse files
authored
Support auto-merge for PRs by @hong-bot (#974)
1 parent 7af68f8 commit b4afc33

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/bump.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,15 @@ jobs:
1717
run: |
1818
git config --global user.name 'github-actions[bot]'
1919
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
20+
- name: Merge PRs
21+
if: github.event_name == 'pull_request' && github.triggering_actor == 'hong-bot' # Run this after bump cask PRs are created.
22+
env:
23+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24+
run: |
25+
gh pr merge ${{ github.event.number }} --auto --rebase
2026
- uses: Homebrew/actions/setup-homebrew@main
2127
- name: Bump packages
2228
env:
23-
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GH_TOKEN }}
29+
HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GH_TOKEN }} # Different from GITHUB_TOKEN, this is a PAT for hong-bot.
2430
run: |
2531
brew bump --no-fork --open-pr --casks --tap=$GITHUB_REPOSITORY

0 commit comments

Comments
 (0)