Skip to content

Commit

Permalink
feat(checks): Add auto-approve job for trunk upgrade PRs (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris3ware authored Feb 11, 2025
1 parent 19aeece commit 75adb76
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/wait-for-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Checks

on:
pull_request:
pull_request_target:
types: [opened, edited, synchronize]
branches: [main]

Expand All @@ -23,3 +23,17 @@ jobs:
uses: poseidon/wait-for-status-checks@6988432d64ad3f9c2608db4ca16fded1b7d36ead # v0.5.0
with:
token: ${{ secrets.GITHUB_TOKEN }}

# Approve PR raised by 3ware-release[bot] to upgrade trunk on trunk branches
# after all checks have passed.
auto-approve-pr:
needs: [enforce-all-checks]
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Auto Approve PR
if: ${{ github.actor == '3ware-release[bot]' && github.head_ref == 'trunk-io/update-trunk' }}
uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363 # v4.0.0
with:
github-token: ${{ secrets.PR_APPROVAL_PAT }}
review-message: All checks passed. Auto Approved.

0 comments on commit 75adb76

Please sign in to comment.