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.

(cherry picked from commit a3ce5970e0)
This commit is contained in:
Wolfgang Walther
2025-06-20 12:56:26 +02:00
committed by github-actions[bot]
parent 9a42b59630
commit e9f22139fa
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

@@ -72,6 +72,7 @@ jobs:
pull-requests: write
with:
baseBranch: ${{ needs.prepare.outputs.baseBranch }}
headBranch: ${{ needs.prepare.outputs.headBranch }}
lint:
name: Lint
@@ -108,7 +109,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 }}