You've already forked pages
forked from didirus/AstralRinth
ci: patch validating git config on windows runner
This commit is contained in:
12
.github/workflows/astralrinth-build.yml
vendored
12
.github/workflows/astralrinth-build.yml
vendored
@@ -41,7 +41,9 @@ jobs:
|
|||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 2
|
fetch-depth: 2
|
||||||
|
|
||||||
- name: 🔍 Validate Git config does not introduce CRLF
|
- name: 🔍 Validate Git config does not introduce CRLF
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "🔍 Checking Git config for CRLF settings..."
|
echo "🔍 Checking Git config for CRLF settings..."
|
||||||
|
|
||||||
@@ -52,18 +54,15 @@ jobs:
|
|||||||
echo "core.eol = $eol_setting"
|
echo "core.eol = $eol_setting"
|
||||||
|
|
||||||
if [ "$autocrlf" = "true" ]; then
|
if [ "$autocrlf" = "true" ]; then
|
||||||
echo "❌ ERROR: core.autocrlf is set to 'true'. Please set to 'input' or 'false'."
|
echo "⚠️ WARNING: core.autocrlf is set to 'true'. Consider setting it to 'input' or 'false'."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$eol_setting" = "crlf" ]; then
|
if [ "$eol_setting" = "crlf" ]; then
|
||||||
echo "❌ ERROR: core.eol is set to 'crlf'. Please unset it or set to 'lf'."
|
echo "⚠️ WARNING: core.eol is set to 'crlf'. Consider unsetting it or setting to 'lf'."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "✅ Git config is safe (no forced CRLF)"
|
|
||||||
|
|
||||||
- name: 🔍 Check migration files line endings (LF only)
|
- name: 🔍 Check migration files line endings (LF only)
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "🔍 Scanning migration SQL files for CR characters (\\r)..."
|
echo "🔍 Scanning migration SQL files for CR characters (\\r)..."
|
||||||
if grep -Iq $'\r' packages/app-lib/migrations/*.sql; then
|
if grep -Iq $'\r' packages/app-lib/migrations/*.sql; then
|
||||||
@@ -72,7 +71,6 @@ jobs:
|
|||||||
fi
|
fi
|
||||||
echo "✅ All migration files use LF line endings"
|
echo "✅ All migration files use LF line endings"
|
||||||
|
|
||||||
|
|
||||||
- name: 🧰 Setup Rust toolchain
|
- name: 🧰 Setup Rust toolchain
|
||||||
uses: actions-rust-lang/setup-rust-toolchain@v1
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
|||||||
Reference in New Issue
Block a user