Skip to content

Commit cc5a58a

Browse files
fix(ci): keep an optional branch input on shared-ci
ci.yml forwards `branch` to shared-ci.yml, but that input was just removed, so the reusable-workflow call failed at startup on every pull_request run. Re-add `branch` as optional (default empty = the triggering ref) and forward it from ci.yml without the `|| 'master'` fallback. PR CI now checks out the PR ref instead of master, release still uses the dispatched ref, and daily CI can still target the v4.x maintenance branch.
1 parent 7fc3794 commit cc5a58a

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ on:
99
workflow_call:
1010
inputs:
1111
branch:
12-
description: "Branch to checkout"
12+
description: "Ref to check out. Empty (the default) uses the ref that triggered the run."
1313
required: false
14-
default: master
14+
default: ''
1515
type: string
1616

1717
jobs:
1818
shared-ci:
1919
uses: ./.github/workflows/shared-ci.yml
2020
with:
21-
branch: ${{ inputs.branch || 'master' }}
21+
branch: ${{ inputs.branch }}
2222
pr-ci-all-required:
2323
if: always()
2424
needs:

.github/workflows/shared-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,11 @@ name: Shared CI Tests
33
on:
44
workflow_call:
55
inputs:
6+
branch:
7+
description: 'Ref to check out. Empty (the default) uses the ref that triggered the run.'
8+
required: false
9+
default: ''
10+
type: string
611
test-published-packages:
712
description: 'Test against published packages instead of checked out code'
813
required: false
@@ -34,6 +39,7 @@ jobs:
3439
# Always need repo for test scripts and configuration, even when testing published packages
3540
uses: actions/checkout@v4
3641
with:
42+
ref: ${{ inputs.branch }}
3743
fetch-depth: 0
3844
submodules: true
3945

0 commit comments

Comments
 (0)