chore: add workflow validation to fix windows colon errors #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |