Skip to content

Commit dae90de

Browse files
GH actions: fix 'checkForCommonlyIgnoredFiles' (#3613)
1 parent dbf142f commit dae90de

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,15 @@ jobs:
4242

4343
- name: Check if commit contains files that should be ignored
4444
run: |
45-
git clone --depth 1 https://github.com/github/gitignore.git &&
46-
cat gitignore/Node.gitignore $(find gitignore/Global -name "*.gitignore" | grep -v ModelSim) > all.gitignore &&
47-
if [[ "$(git ls-files -iX all.gitignore)" != "" ]]; then
48-
echo "::error::Please remove these files:"
49-
git ls-files -iX all.gitignore
45+
git clone --depth 1 https://github.com/github/gitignore.git
46+
47+
rm gitignore/Global/ModelSim.gitignore
48+
rm gitignore/Global/Images.gitignore
49+
cat gitignore/Node.gitignore gitignore/Global/*.gitignore > all.gitignore
50+
51+
IGNORED_FILES=$(git ls-files --cached --ignored --exclude-from=all.gitignore)
52+
if [[ "$IGNORED_FILES" != "" ]]; then
53+
echo -e "::error::Please remove these files:\n$IGNORED_FILES" | sed -z 's/\n/%0A/g'
5054
exit 1
5155
fi
5256

0 commit comments

Comments
 (0)