Skip to content

Commit

Permalink
Restore test file
Browse files Browse the repository at this point in the history
Signed-off-by: ZePan110 <ze.pan@intel.com>
  • Loading branch information
ZePan110 committed Sep 25, 2024
1 parent 6d17d90 commit f9c0e71
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions .github/workflows/pr-path-detection.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,38 +9,38 @@ on:
types: [opened, reopened, ready_for_review, synchronize]

jobs:
# check-dockerfile-paths:
# runs-on: ubuntu-latest
# steps:
# - name: Clean Up Working Directory
# run: sudo rm -rf ${{github.workspace}}/*

# - name: Checkout Repo GenAIExamples
# uses: actions/checkout@v4

# - name: Clone Repo GenAIComps
# run: |
# cd ..
# git clone https://github.com/opea-project/GenAIComps.git

# - name: Check for Missing Dockerfile Paths in GenAIComps
# run: |
# cd ${{github.workspace}}
# miss="FALSE"
# while IFS=: read -r file line content; do
# dockerfile_path=$(echo "$content" | awk -F '-f ' '{print $2}' | awk '{print $1}')
# if [[ ! -f "../GenAIComps/${dockerfile_path}" ]]; then
# miss="TRUE"
# echo "Missing Dockerfile: GenAIComps/${dockerfile_path} (Referenced in GenAIExamples/${file}:${line})"
# fi
# done < <(grep -Ern 'docker build .* -f comps/.+/Dockerfile' --include='*.md' .)


# if [[ "$miss" == "TRUE" ]]; then
# exit 1
# fi

# shell: bash
check-dockerfile-paths:
runs-on: ubuntu-latest
steps:
- name: Clean Up Working Directory
run: sudo rm -rf ${{github.workspace}}/*

- name: Checkout Repo GenAIExamples
uses: actions/checkout@v4

- name: Clone Repo GenAIComps
run: |
cd ..
git clone https://github.com/opea-project/GenAIComps.git
- name: Check for Missing Dockerfile Paths in GenAIComps
run: |
cd ${{github.workspace}}
miss="FALSE"
while IFS=: read -r file line content; do
dockerfile_path=$(echo "$content" | awk -F '-f ' '{print $2}' | awk '{print $1}')
if [[ ! -f "../GenAIComps/${dockerfile_path}" ]]; then
miss="TRUE"
echo "Missing Dockerfile: GenAIComps/${dockerfile_path} (Referenced in GenAIExamples/${file}:${line})"
fi
done < <(grep -Ern 'docker build .* -f comps/.+/Dockerfile' --include='*.md' .)
if [[ "$miss" == "TRUE" ]]; then
exit 1
fi
shell: bash

check-the-validity-of-hyperlinks-in-README:
runs-on: ubuntu-latest
Expand Down
File renamed without changes.

0 comments on commit f9c0e71

Please sign in to comment.