From 99af0ba0e5a9882a3eabba7eb2d7894dcc3d5b3e Mon Sep 17 00:00:00 2001 From: Richard Alpe Date: Tue, 29 Jul 2025 16:29:05 +0200 Subject: [PATCH] .github: fix parallel selection for workflow call Signed-off-by: Richard Alpe --- .github/workflows/build.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 436e9de3..6f8b55bd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,8 @@ jobs: build: name: Build ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.name || inputs.name }} ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.target || inputs.target }} runs-on: [ self-hosted, latest ] + env: + PARALLEL: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.parallel == 'true' || github.event_name != 'workflow_dispatch' && inputs.parallel == true }} strategy: fail-fast: false outputs: @@ -126,7 +128,7 @@ jobs: id: parallel run: | - if [ "${{ ((github.event.inputs.parallel == 'true' && github.event_name == 'workflow_dispatch') || (github.ref_name != 'main' && github.event_name != 'workflow_dispatch')) }}" == "true" ]; then + if [ "$PARALLEL" == "true" ]; then echo "BR2_PER_PACKAGE_DIRECTORIES=y" >> output/.config MAKE="make -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))" echo "Building in parallel with -j$((`getconf _NPROCESSORS_ONLN` / 2 + 2))"