Skip to content

Commit

Permalink
Add empty list check (opea-project#914)
Browse files Browse the repository at this point in the history
* Add outputs.

Signed-off-by: ZePan110 <[email protected]>

* Add empty list check

Signed-off-by: ZePan110 <[email protected]>

* test CI.

Signed-off-by: ZePan110 <[email protected]>

* Remove test files

Signed-off-by: ZePan110 <[email protected]>

* remove debug code

Signed-off-by: chensuyue <[email protected]>

---------

Signed-off-by: ZePan110 <[email protected]>
Signed-off-by: chensuyue <[email protected]>
Co-authored-by: chensuyue <[email protected]>
  • Loading branch information
2 people authored and cameronmorin committed Nov 22, 2024
1 parent 790922d commit ba2d037
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/_comps-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,17 @@ jobs:
mode: ${{ inputs.mode }}
run: |
build_list=$(bash ${{ github.workspace }}/.github/workflows/scripts/get_cicd_list.sh "${mode}" ${docker_compose_path})
echo "build_list=${build_list}" >> $GITHUB_OUTPUT
echo "${build_list}"
if [ -z "${build_list}" ]; then
echo "empty=true" >> $GITHUB_OUTPUT
echo "${{ inputs.service }} have no ${mode} part."
else
echo "empty=false" >> $GITHUB_OUTPUT
echo "build_list=${build_list}" >> $GITHUB_OUTPUT
fi
- name: Build Image
if: ${{ fromJSON(inputs.build) && steps.get-yaml-path.outputs.file_exists == 'true' }}
if: ${{ fromJSON(inputs.build) && steps.get-yaml-path.outputs.file_exists == 'true' && steps.get-build-list.outputs.empty == 'false' }}
uses: opea-project/validation/actions/image-build@main
with:
work_dir: ${{ github.workspace }}
Expand Down

0 comments on commit ba2d037

Please sign in to comment.