From 353d4e7fd6e22f1693ee805f2387bf7c24952b52 Mon Sep 17 00:00:00 2001 From: Ads Dawson <104169244+GangGreenTemperTatum@users.noreply.github.com> Date: Thu, 26 Dec 2024 19:38:38 -0500 Subject: [PATCH] chore: add workflow validation to fix windows colon errors --- .github/workflows/check-filenames-pr.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/check-filenames-pr.yml diff --git a/.github/workflows/check-filenames-pr.yml b/.github/workflows/check-filenames-pr.yml new file mode 100644 index 00000000..614b6dcd --- /dev/null +++ b/.github/workflows/check-filenames-pr.yml @@ -0,0 +1,23 @@ +name: Check Filenames on PR + +on: + pull_request: + types: [opened, synchronize, reopened] + +jobs: + check-filenames: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Check for invalid filenames + run: | + invalid_files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep ":" || true) + if [ ! -z "$invalid_files" ]; then + echo "Error: The following files contain ':' in their names, which is not compatible with Windows:" + echo "$invalid_files" + exit 1 + fi \ No newline at end of file