workflows/{check,reviewers}: don't run on PRs from secondary development branches

It makes no sense to check cherry picks or request reviewers on PRs from
staging-next to master, the same on backbranches or for haskell-updates
into staging.
This commit is contained in:
Wolfgang Walther
2025-06-20 12:56:26 +02:00
parent 7763be5a80
commit a3ce5970e0
2 changed files with 8 additions and 2 deletions

View File

@@ -6,6 +6,9 @@ on:
baseBranch:
required: true
type: string
headBranch:
required: true
type: string
permissions: {}
@@ -31,7 +34,7 @@ jobs:
cherry-pick:
if: |
github.event_name == 'pull_request' ||
fromJSON(inputs.baseBranch).stable
(fromJSON(inputs.baseBranch).stable && !contains(fromJSON(inputs.headBranch).type, 'development'))
permissions:
pull-requests: write
runs-on: ubuntu-24.04-arm

View File

@@ -71,6 +71,7 @@ jobs:
pull-requests: write
with:
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
headBranch: ${{ needs.prepare.outputs.headBranch }}
lint:
name: Lint
@@ -107,7 +108,9 @@ jobs:
reviewers:
name: Reviewers
needs: [prepare, eval]
if: needs.prepare.outputs.targetSha
if: |
needs.prepare.outputs.targetSha &&
!contains(fromJSON(needs.prepare.outputs.headBranch).type, 'development')
uses: ./.github/workflows/reviewers.yml
secrets:
OWNER_APP_PRIVATE_KEY: ${{ secrets.OWNER_APP_PRIVATE_KEY }}