Skip to content

Commit

Permalink
Remove duplicate code (opea-project#596)
Browse files Browse the repository at this point in the history
Signed-off-by: zepan <[email protected]>
  • Loading branch information
ZePan110 authored Sep 3, 2024
1 parent 12fd97a commit 8325d5d
Showing 1 changed file with 9 additions and 15 deletions.
24 changes: 9 additions & 15 deletions .github/workflows/_comps-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,24 +53,18 @@ jobs:
cd ${{ github.workspace }}/.github/workflows/docker/compose
# service=$(echo ${{ inputs.service }} | cut -d'_' -f1)
if [[ "${{ inputs.mode }}" == "CD" ]]; then
if [ -f "${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose-cd.yaml" ]; then
docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose-cd.yaml
echo "file_exists=true" >> $GITHUB_OUTPUT
else
echo "There is no CD part of ${{ inputs.service }} that needs to be executed."
echo "file_exists=false" >> $GITHUB_OUTPUT
fi
docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose-cd.yaml
else
if [ -f "${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose.yaml" ]; then
docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose.yaml
echo "file_exists=true" >> $GITHUB_OUTPUT
else
echo "There is no CI part of ${{ inputs.service }} that needs to be executed."
echo "file_exists=false" >> $GITHUB_OUTPUT
fi
docker_compose_yml=${{ github.workspace }}/.github/workflows/docker/compose/${{ inputs.service }}-compose.yaml
fi
echo "docker_compose_path=${docker_compose_yml}" >> $GITHUB_OUTPUT
if [ -f "$docker_compose_yml" ]; then
echo "file_exists=true" >> $GITHUB_OUTPUT
else
echo "There is no ${{ inputs.mode }} part of ${{ inputs.service }} that needs to be executed."
echo "file_exists=false" >> $GITHUB_OUTPUT
fi
if [[ $(grep -c "llava-tgi:" ${docker_compose_yml}) != 0 ]]; then
git clone https://github.com/yuanwu2017/tgi-gaudi.git && cd tgi-gaudi && git checkout v2.0.4
fi
Expand Down

0 comments on commit 8325d5d

Please sign in to comment.