Skip to content

Commit 42fe9d8

Browse files
committed
Test
1 parent 9e98e8d commit 42fe9d8

File tree

1 file changed

+16
-25
lines changed

1 file changed

+16
-25
lines changed
Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,16 @@
1-
name: ๐Ÿ”„ Integration
2-
3-
on:
4-
pull_request:
5-
6-
jobs:
7-
linelint:
8-
runs-on: ubuntu-latest
9-
steps:
10-
- uses: actions/checkout@v4
11-
with:
12-
fetch-depth: 0
13-
14-
- name: Check for 1. missing end line breaks and 2. control characters in filenames
1+
- name: Find files with issues
152
run: |
163
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
17-
success=true
4+
echo "๋ณ€๊ฒฝ๋œ ํŒŒ์ผ ๋ชฉ๋ก:"
5+
echo "$files"
186
7+
success=true
8+
199
# ์ค„๋ฐ”๊ฟˆ ์ฒดํฌ
2010
echo "## ์ค„๋ฐ”๊ฟˆ ๋ˆ„๋ฝ ํŒŒ์ผ" >> $GITHUB_STEP_SUMMARY
2111
for file in $files; do
2212
if [ -s "$file" ] && [ "$(tail -c 1 $file | wc -l)" -eq 0 ]; then
13+
echo "๋ฐœ๊ฒฌ๋œ ์ค„๋ฐ”๊ฟˆ ๋ˆ„๋ฝ: $file" # ๋””๋ฒ„๊น… ๋กœ๊ทธ
2314
echo "- $file" >> $GITHUB_STEP_SUMMARY
2415
success=false
2516
fi
@@ -28,18 +19,18 @@ jobs:
2819
# ์ œ์–ด๋ฌธ์ž ์ฒดํฌ
2920
echo -e "\n## ์ œ์–ด๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ ํŒŒ์ผ๋ช…" >> $GITHUB_STEP_SUMMARY
3021
for file in $files; do
31-
# ls -b๋ฅผ ํ†ตํ•ด ์ œ์–ด๋ฌธ์ž๋ฅผ ๋ฐฑ์Šฌ๋ž˜์‹œ ์ด์Šค์ผ€์ดํ”„ ํ˜•ํƒœ๋กœ ํ‘œ์‹œ
32-
filename=$(ls -b "$file" 2>/dev/null)
33-
# ์›๋ณธ ํŒŒ์ผ๋ช…๊ณผ ์ด์Šค์ผ€์ดํ”„๋œ ํŒŒ์ผ๋ช…์ด ๋‹ค๋ฅด๋‹ค๋ฉด ์ œ์–ด๋ฌธ์ž๊ฐ€ ํฌํ•จ๋œ ๊ฒƒ
34-
if [ "$file" != "$filename" ]; then
35-
echo "- $filename" >> $GITHUB_STEP_SUMMARY
36-
success=false
22+
if [ -e "$file" ]; then
23+
clean_name=$(printf '%q' "$file")
24+
if [ "$file" != "$clean_name" ]; then
25+
echo "๋ฐœ๊ฒฌ๋œ ์ œ์–ด๋ฌธ์ž: $file -> $clean_name" # ๋””๋ฒ„๊น… ๋กœ๊ทธ
26+
echo "- $file" >> $GITHUB_STEP_SUMMARY
27+
success=false
28+
fi
3729
fi
3830
done
3931
4032
if [ "$success" = false ]; then
41-
echo -e "\n:warning: ์œ„ ๋ฌธ์ œ๋“ค์„ ํ•ด๊ฒฐํ•ด์ฃผ์„ธ์š”:" >> $GITHUB_STEP_SUMMARY
42-
echo "1. ํŒŒ์ผ ๋์— ๋ˆ„๋ฝ๋œ ์ค„ ๋ฐ”๊ฟˆ์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”." >> $GITHUB_STEP_SUMMARY
43-
echo "2. ํŒŒ์ผ๋ช…์—์„œ ์ œ์–ด๋ฌธ์ž๋ฅผ ์ œ๊ฑฐํ•ด ์ฃผ์„ธ์š”." >> $GITHUB_STEP_SUMMARY
33+
echo -e "\n:warning: ์œ„ ๋ฌธ์ œ๋“ค์„ ํ•ด๊ฒฐํ•ด ์ฃผ์„ธ์š”:" >> $GITHUB_STEP_SUMMARY
34+
echo "ํ˜„์žฌ ์ƒํƒœ: success=$success" # ๋””๋ฒ„๊น… ๋กœ๊ทธ
4435
exit 1
45-
fi
36+
fi

0 commit comments

Comments
ย (0)