From d358b93123214d2ac84d6d53d595962b7479a5ec Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Mon, 29 Jun 2020 11:06:35 -0500 Subject: [PATCH] Create allowed_names.yml --- .github/workflows/allowed_names.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/allowed_names.yml diff --git a/.github/workflows/allowed_names.yml b/.github/workflows/allowed_names.yml new file mode 100644 index 0000000..20e3c5b --- /dev/null +++ b/.github/workflows/allowed_names.yml @@ -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