Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.

Commit e32b292

Browse files
committed
workflows: check commit for ignored files
1 parent 5ec8748 commit e32b292

File tree

2 files changed

+17
-0
lines changed

2 files changed

+17
-0
lines changed

.DS_Store

-6 KB
Binary file not shown.

.github/workflows/ci.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,3 +119,20 @@ jobs:
119119

120120
- name: Run Tests
121121
run: npm run testonly
122+
123+
checkForCommonlyIgnoredFiles:
124+
name: Check for commonly ignored files
125+
runs-on: ubuntu-latest
126+
steps:
127+
- name: Checkout repo
128+
uses: actions/checkout@v2
129+
130+
- name: Check if commit contains files that should be ignored
131+
run: |
132+
git clone --depth 1 https://github.com/github/gitignore.git &&
133+
cat gitignore/Node.gitignore $(find gitignore/Global -name "*.gitignore" | grep -v ModelSim) > all.gitignore &&
134+
if [[ "$(git ls-files -iX all.gitignore)" != "" ]]; then
135+
echo "::error::Please remove these files:"
136+
git ls-files -iX all.gitignore
137+
exit 1
138+
fi

0 commit comments

Comments
 (0)