mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-05-06 23:32:30 +08:00
Automated security fixes applied by Runner Guard (https://github.com/Vigilant-LLC/runner-guard). Changes: .github/workflows/check-ai-co-authors.yml | 4 +++- .github/workflows/check-line-endings.yml | 5 ++++- .github/workflows/pullrequest-ci-run.yml | 2 +- .github/workflows/stable-release.yml | 2 +- .github/workflows/test-ci.yml | 4 ++-- .github/workflows/update-api-stubs.yml | 2 +- .github/workflows/update-ci-container.yml | 2 +- .github/workflows/update-version.yml | 9 ++++++--- .github/workflows/windows_release_nightly_pytorch.yml | 2 +- .github/workflows/windows_release_package.yml | 2 +- 10 files changed, 21 insertions(+), 13 deletions(-)
43 lines
1.3 KiB
YAML
43 lines
1.3 KiB
YAML
name: Check for Windows Line Endings
|
|
|
|
on:
|
|
pull_request:
|
|
branches: ['*'] # Trigger on all pull requests to any branch
|
|
|
|
jobs:
|
|
check-line-endings:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0 # Fetch all history to compare changes
|
|
|
|
- name: Check for Windows line endings (CRLF)
|
|
run: |
|
|
# Get the list of changed files in the PR
|
|
CHANGED_FILES=$(git diff --name-only ${{ github.event.pull_request.base.sha }}..${PR_HEAD_SHA})
|
|
|
|
# Flag to track if CRLF is found
|
|
CRLF_FOUND=false
|
|
|
|
# Loop through each changed file
|
|
for FILE in $CHANGED_FILES; do
|
|
# Check if the file exists and is a text file
|
|
if [ -f "$FILE" ] && file "$FILE" | grep -q "text"; then
|
|
# Check for CRLF line endings
|
|
if grep -UP '\r$' "$FILE"; then
|
|
echo "Error: Windows line endings (CRLF) detected in $FILE"
|
|
CRLF_FOUND=true
|
|
fi
|
|
fi
|
|
done
|
|
|
|
# Exit with error if CRLF was found
|
|
if [ "$CRLF_FOUND" = true ]; then
|
|
exit 1
|
|
fi
|
|
|
|
env:
|
|
PR_HEAD_SHA: ${{ github.event.pull_request.head.sha }} |