mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-11 18:32:23 +08: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.
(cherry picked from commit a3ce5970e0)
This commit is contained in:
committed by
github-actions[bot]
parent
9a42b59630
commit
e9f22139fa
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
@@ -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 }}
|
||||
|
||||
Reference in New Issue
Block a user