Adding GitHub Actions workflow test for duplicate filenames (#340)

* Adding GitHub Actions workflow test for duplicate filenames

* Adding generic error message

* Deduping fsutil.exe and teams.exe
This commit is contained in:
Wietze
2023-11-08 01:55:24 +00:00
committed by GitHub
parent 5b4d6d604c
commit 80267d91dd
5 changed files with 52 additions and 63 deletions

View File

@@ -12,10 +12,20 @@ jobs:
run: |
files=$(find "$GITHUB_WORKSPACE/yml" -type f -not -name "*.yml");
if [[ $files ]]; then
echo "Files with unexpected extension found, please ensure you use '.yml' (all lower case) for files in the yml/ folder.";
echo "::error::Files with unexpected extension found, please ensure you use '.yml' (all lower case) for files in the yml/ folder.";
for i in $files; do echo "::error file=$i,line=1::Unexpected extension"; done
exit 1;
fi
unset files
- name: Check duplicate file names
run: |
files=$(find "$GITHUB_WORKSPACE/yml/OSBinaries" "$GITHUB_WORKSPACE/yml/OtherMSBinaries" -type f -printf '%h %f\n' -iname "*.yml" | sort -t ' ' -k 2,2 -f | uniq -i -f 1 --all-repeated=separate | tr ' ' '/')
if [[ $files ]]; then
echo "::error::Files with duplicate filenames detected, please make sure you don't create duplicate entries.";
for i in $files; do echo "::error file=$i,line=1::Duplicate filename"; done
exit 1;
fi
unset files
- name: yaml-lint
uses: ibiqlik/action-yamllint@v3
with: