mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-22 00:20:58 +00:00
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:
5
.github/workflows/check.yml
vendored
5
.github/workflows/check.yml
vendored
@@ -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
|
||||
|
||||
5
.github/workflows/pr.yml
vendored
5
.github/workflows/pr.yml
vendored
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user