Create allowed_names.yml

This commit is contained in:
Eric Nemchik 2020-06-29 11:06:35 -05:00 committed by GitHub
parent 665c13cc4b
commit d358b93123
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

24
.github/workflows/allowed_names.yml vendored Normal file
View file

@ -0,0 +1,24 @@
name: Check Allowed File Names
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
Check Allowed File Names:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check Allowed File Names
run: |
NOT_SAMPLES=$(find . -not -path '*/\.*' -type f ! \( -name '*.sample' -o -name 'README.md' -o -name 'LICENSE' \))
NOT_SAMPLES_COUNT=$(echo "${NOT_SAMPLES}" | wc -w)
if (( NOT_SAMPLES_COUNT > 0 )); then
echo "The following files are not allowed:"
echo "${NOT_SAMPLES}"
exit 1
fi