Skip to content

Commit cb5578c

Browse files
authored
Only run the image builds if we are doing Linux Python builds (#438)
Closes #433
1 parent 6b4d414 commit cb5578c

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

.github/workflows/linux.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ jobs:
4646
path: target/release/pythonbuild
4747

4848
image:
49+
needs:
50+
- generate-matrix
51+
if: ${{ needs.generate-matrix.outputs.any_builds }}
4952
strategy:
5053
fail-fast: false
5154
matrix:
@@ -138,6 +141,14 @@ jobs:
138141
uv run ci-matrix.py --platform linux --labels "${{ steps.get-labels.outputs.labels }}" > matrix.json && echo "matrix=$(cat matrix.json)" >> $GITHUB_OUTPUT
139142
# Display the matrix for debugging too
140143
cat matrix.json | jq
144+
145+
if jq -e '.include | length > 0' matrix.json > /dev/null; then
146+
# Build matrix has entries
147+
echo "any_builds=true" >> $GITHUB_OUTPUT
148+
else
149+
# Build matrix is empty
150+
echo "any_builds=true" >> $GITHUB_OUTPUT
151+
fi
141152
142153
build:
143154
needs:

0 commit comments

Comments
 (0)