Skip to content

Commit aefdcb2

Browse files
committed
.github: fix parallel selection for workflow call
Signed-off-by: Richard Alpe <[email protected]>
1 parent ce89499 commit aefdcb2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ jobs:
5555
build:
5656
name: Build ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }}
5757
runs-on: [ self-hosted, latest ]
58+
env:
59+
PARALLEL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.parallel == 'true' || github.event_name != 'workflow_dispatch' && inputs.parallel == true }}
5860
strategy:
5961
fail-fast: false
6062
outputs:
@@ -126,7 +128,7 @@ jobs:
126128
id: parallel
127129
run: |
128130
129-
if [ "${{ ((github.event.inputs.parallel == 'true' && github.event_name == 'workflow_dispatch') || (github.ref_name != 'main' && github.event_name != 'workflow_dispatch')) }}" == "true" ]; then
131+
if [ "$PARALLEL" == "true" ]; then
130132
echo "BR2_PER_PACKAGE_DIRECTORIES=y" >> output/.config
131133
MAKE="make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"
132134
echo "Building in parallel with -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"

0 commit comments

Comments
 (0)