mirror of
https://github.com/github/awesome-copilot.git
synced 2026-07-18 03:40:02 +00:00
Fix check-line-endings: upgrade actions/checkout v3 to v4.3.1, simplify script
Co-authored-by: aaronpowell <434140+aaronpowell@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
479fe2dfbd
commit
045273cfec
@@ -13,17 +13,16 @@ jobs:
|
|||||||
check-line-endings:
|
check-line-endings:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0
|
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
|
||||||
|
|
||||||
- name: Check for CRLF line endings in markdown files
|
- name: Check for CRLF line endings in markdown files
|
||||||
run: |
|
run: |
|
||||||
! grep -l $'\r' $(find . -name "*.md")
|
CRLF_FILES=$(grep -rl $'\r' --include="*.md" . 2>/dev/null || true)
|
||||||
if [ $? -eq 0 ]; then
|
if [ -z "$CRLF_FILES" ]; then
|
||||||
echo "✅ No CRLF line endings found in markdown files"
|
echo "✅ No CRLF line endings found in markdown files"
|
||||||
exit 0
|
|
||||||
else
|
else
|
||||||
echo "❌ CRLF line endings found in markdown files"
|
echo "❌ CRLF line endings found in markdown files"
|
||||||
echo "Files with CRLF line endings:"
|
echo "Files with CRLF line endings:"
|
||||||
grep -l $'\r' $(find . -name "*.md")
|
echo "$CRLF_FILES"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user