Skip to content

Commit 98fcdd5

Browse files
committed
Fix
Signed-off-by: ZePan110 <ze.pan@intel.com>
1 parent 1b3291a commit 98fcdd5

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/nightly-docker-build-publish.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,34 @@ jobs:
2626
id: get-matrix
2727
run: |
2828
examples=($(echo ${EXAMPLES} | tr ',' ' '))
29+
echo "EXAMPLES: $EXAMPLES"
30+
echo "examples: $examples"
2931
examples_json=$(printf '%s\n' "${examples[@]}" | sort -u | jq -R '.' | jq -sc '.')
32+
echo "$examples_json"
3033
echo "examples_json=$examples_json" >> $GITHUB_OUTPUT
3134
echo "EXAMPLES=$EXAMPLES" >> $GITHUB_OUTPUT
3235
echo "TAG=$TAG" >> $GITHUB_OUTPUT
3336
echo "PUBLISH_TAGS=$PUBLISH_TAGS" >> $GITHUB_OUTPUT
3437
38+
check:
39+
needs: [get-build-matrix]
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Check
43+
run: |
44+
set -x
45+
echo "EXAMPLES: ${{ needs.get-build-matrix.outputs.EXAMPLES }}"
46+
echo "examples_json: ${{ needs.get-build-matrix.outputs.examples_json }}"
47+
if [ ${{ needs.get-build-matrix.outputs.examples_json != '' && fromJSON(needs.get-build-matrix.outputs.examples_json).length != 0 }} ]; then
48+
echo "Examples found."
49+
else
50+
echo "No examples found."
51+
fi
52+
3553
build-and-test:
3654
needs: get-build-matrix
37-
if: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json).length != 0 }}
55+
# if: ${{ needs.get-build-matrix.outputs.examples_json != '' && fromJSON(needs.get-build-matrix.outputs.examples_json).length != 0 }}
56+
if: ${{ needs.get-build-matrix.outputs.examples_json != '' && fromJSON(needs.get-build-matrix.outputs.examples_json).length > 0 }}
3857
strategy:
3958
matrix:
4059
example: ${{ fromJSON(needs.get-build-matrix.outputs.examples_json) }}

0 commit comments

Comments
 (0)