Skip to content

Commit

Permalink
fix(checks): Amend job execution conditions (#122)
Browse files Browse the repository at this point in the history
  • Loading branch information
chris3ware authored Feb 11, 2025
1 parent f927841 commit 84c17f9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/wait-for-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Checks

on:
pull_request:
types: [opened, edited, synchronize]
branches: [main]
pull_request_target:
types: [opened, edited, synchronize]
branches: [main]
Expand All @@ -14,6 +17,7 @@ concurrency:

jobs:
enforce-all-checks:
if: ${{ github.event_name == 'pull_request' }}
permissions:
checks: read
runs-on: ubuntu-latest
Expand All @@ -27,12 +31,12 @@ jobs:
# Approve PR raised by 3ware-release[bot] to upgrade trunk on trunk branches
# after all checks have passed.
auto-approve-pr:
if: ${{ github.actor == '3ware-release[bot]' && github.head_ref == 'trunk-io/update-trunk' }}
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 }}
Expand Down

0 comments on commit 84c17f9

Please sign in to comment.