Skip to content

Commit

Permalink
Fix Dockerfile detect issue (opea-project#652)
Browse files Browse the repository at this point in the history
Signed-off-by: ZePan110 <[email protected]>
  • Loading branch information
ZePan110 authored Sep 10, 2024
1 parent c718602 commit 2a91903
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/pr-dockerfile-path-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,14 @@ jobs:
changed_files="$(git diff --name-status --diff-filter=DR ${{ github.event.pull_request.base.sha }} ${merged_commit} -- '**/Dockerfile**' | cut -f2)"
if [ -n "$changed_files" ]; then
for file in $changed_files; do
matching_files=$(grep -rl "$file" ../GenAIExamples/**/*.md)
matching_files=$(grep -rl "$file" ../GenAIExamples/**/*.md) || true
if [ -n "$matching_files" ]; then
is_use="TRUE"
used_files+="$file "
echo "Modified Dockerfile '$file' is referenced in:"
echo "$matching_files"
else
echo "Modified Dockerfile '$file' is not referenced"
fi
done
fi
Expand Down

0 comments on commit 2a91903

Please sign in to comment.