Skip to content

Commit 2f78a50

Browse files
authored
ci: add line ending check workflow for current pr (#336)
* ci: add line ending check workflow for current pr * ci: replace `fernandrone/linelint` to custom job in integration workflow * ci: remove file * ci: polish `linelint` job
1 parent 521c00b commit 2f78a50

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

โ€Ž.github/workflows/integration.yaml

+18-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,21 @@ jobs:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4
11-
- uses: fernandrone/[email protected]
11+
with:
12+
fetch-depth: 0
13+
14+
- name: Find files missing end line break
15+
run: |
16+
files=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }})
17+
success=true
18+
for file in $files; do
19+
if [ "$(tail -c 1 $file | wc -l)" -eq 0 ]; then
20+
echo "- $file" >> $GITHUB_STEP_SUMMARY
21+
success=false
22+
fi
23+
done
24+
25+
if [ "$success" = false ]; then
26+
echo -e "\n:warning: ์œ„ ํŒŒ์ผ๋“ค์˜ ๋์— ๋ˆ„๋ฝ๋œ ์ค„ ๋ฐ”๊ฟˆ์„ ์ถ”๊ฐ€ํ•ด ์ฃผ์„ธ์š”." >> $GITHUB_STEP_SUMMARY
27+
exit 1
28+
fi

0 commit comments

Comments
ย (0)