Skip to content

Commit 8d55df6

Browse files
committed
improve script to handle file list
1 parent b0351ba commit 8d55df6

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

.github/workflows/aws-service-sanity-check.yml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,21 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v4
1414
- name: Verify documentation files and links
15+
# check if the files exists in the repository. The file list is in utils/doc-links.txt.
1516
run: |
16-
missing_count=0
17+
missing=0
1718
while read -r file; do
18-
if [ ! -f "$file" ]; then
19-
missing_files="$missing_files $file"
20-
fi
19+
if [ ! -f "$file" ]; then
20+
if [ $missing -eq 0 ]; then
21+
echo "❌ Missing files referenced in AWS documentation:"
22+
missing=$((missing + 1))
23+
fi
24+
echo " - $file"
25+
fi
2126
done < utils/doc-links.txt
22-
23-
if [ $missing_count -gt 0 ]; then
24-
echo "❌ Missing files referenced in AWS documentation:"
25-
echo "Instructions:"
26-
echo " These files are required for AWS services or documentations. Restore missing files or update documentation before merge."
27-
echo " Refer to team wiki "AWS Service and Documentation Links" for details. "
28-
exit 1
27+
28+
if [ $missing -ge 1 ]; then
29+
exit 1
2930
else
30-
echo "✅ All documentation-referenced files exist"
31-
fi
31+
echo "✅ All documentation-referenced files exist"
32+
fi

0 commit comments

Comments
 (0)