fix: Add simple corrections to the WSL2 article #337
Workflow file for this run
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 for spaces | |
on: | |
pull_request: | |
branches: [main] | |
jobs: | |
check-filenames-spaces: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Fetch all history to ensure we can access all branches | |
- name: Check filenames for spaces | |
id: list-files | |
run: | | |
# Get the list of added files from the pull request | |
FILENAMES_SPACES=$(git diff --name-only origin/main...HEAD | ( grep "\s" || true ) ) | |
if [ -n "$FILENAMES_SPACES" ]; then | |
echo "Rejecting merge. PR has the following files with spaces in their names:" | |
echo "$FILENAMES_SPACES" | |
echo "Please replace the spaces, for example, with a dash." | |
exit 1 | |
else | |
echo "All added files have no spaces." | |
fi |