Skip to content

Commit

Permalink
Modify output messages. (opea-project#569)
Browse files Browse the repository at this point in the history
* Reduced output.

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

* Output the location where the modified Dockerfile file is referenced.

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

* for test

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

* Restore test file.

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

---------

Signed-off-by: zepan <[email protected]>
  • Loading branch information
ZePan110 authored Aug 28, 2024
1 parent 3e548f3 commit 3e87c3b
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions .github/workflows/pr-dockerfile-path-scan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:

- name: Check for changed Dockerfile paths in yaml
run: |
set -xe
set -e
shopt -s globstar
cd ${{github.workspace}}
is_use="FALSE"
Expand All @@ -52,7 +52,7 @@ jobs:
- name: Check for changed Dockerfile paths in readme
run: |
set -xe
set -e
shopt -s globstar
cd ${{github.workspace}}
is_use="FALSE"
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
- name: Check for changed Dockerfile paths
run: |
set -xe
set -e
shopt -s globstar
cd ${{github.workspace}}
is_use="FALSE"
Expand All @@ -102,9 +102,12 @@ 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
if grep -q "$file" ../GenAIExamples/**/*.md; then
matching_files=$(grep -rl "$file" ../GenAIExamples/**/*.md)
if [ -n "$matching_files" ]; then
is_use="TRUE"
used_files+="$file "
echo "Modified Dockerfile '$file' is referenced in:"
echo "$matching_files"
fi
done
fi
Expand Down

0 comments on commit 3e87c3b

Please sign in to comment.