bglug.it/.gitea/workflows/unicode_check.yaml
paspo 7d44a367d6
Some checks failed
Check for disallowed chars / unicode-check (pull_request) Failing after 1m52s
test5
2024-08-04 13:38:39 +02:00

26 lines
853 B
YAML

---
name: Check for disallowed chars
on:
pull_request:
jobs:
unicode-check:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check for disallowed chars
run: |
set -x
git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short $@
modifiche=$(git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep -E "^[+]" | grep -Ev '^(--- a/|\+\+\+ b/)')
num=$(echo $modifiche | grep -c -e '[\u2014]' -e '[\u2018]' -e '[\u2019]' -e '[\u201C]' -e '[\u201D]' -e '[\u2026]' )
echo "modifiche: $modifiche"
echo "num: $num"
if [ $num -gt 0 ] ; then exit 1 ; else echo "ok" ; done