Skip to content

Commit 753e668

Browse files
try different approach
1 parent 7b36de3 commit 753e668

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

.github/workflows/test.yml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,15 +64,21 @@ jobs:
6464
fi
6565

6666
echo "All valid notebooks: $NB_JSON"
67-
68-
# 5) Write to $GITHUB_OUTPUT (modern approach instead of ::set-output)
69-
echo "notebooks=$NB_JSON" >> $GITHUB_OUTPUT
7067

68+
# 5) Write to $GITHUB_OUTPUT
69+
if [ "$NB_JSON" != "[]" ]; then
70+
echo "has_notebooks=true" >> $GITHUB_OUTPUT
71+
else
72+
echo "has_notebooks=false" >> $GITHUB_OUTPUT
73+
fi
74+
75+
echo "notebooks=$NB_JSON" >> $GITHUB_OUTPUT
76+
7177
# ---------------------------------------------------------
7278
# 2) Test each changed notebook in parallel
7379
# ---------------------------------------------------------
7480
test_notebooks:
75-
if: ${{ needs.gather_notebooks.outputs.notebooks != '[]' }}
81+
if: ${{ needs.gather_notebooks.outputs.has_notebooks == 'true' }}
7682
needs: gather_notebooks
7783
runs-on: ubuntu-latest
7884
strategy:

0 commit comments

Comments
 (0)