bglug.it/.gitea/workflows/unicode_check.yaml
paspo a2f52db0e5
All checks were successful
Check for disallowed chars / unicode-check (pull_request) Successful in 1m42s
test15
2024-08-07 21:23:38 +02:00

47 lines
1.6 KiB
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: Getting changed files
id: file-lister
run: |
echo "Initial commit: ${{ github.event.pull_request.base.sha }}"
echo "Final commit: ${{ github.event.pull_request.head.sha }}"
F=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep \.md$ )
echo "File list:"
echo "$F"
echo "FILELIST=$F" >> "$GITHUB_OUTPUT"
- name: markdownlint-cli
# env:
# FILELIST: ${{ steps.file-lister.outputs.FILELIST }}
uses: nosborn/github-action-markdown-cli@v3.3.0
with:
files: ${{ steps.file-lister.outputs.FILELIST }}
config_file: .markdownlint.yaml
dot: false
# rules: examples/rules/custom.js
# num=$(git diff --unified=0 ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep -E "^[+]" | grep -Ev '^(--- a/|\+\+\+ b/)' | grep -c -e '[\u2014]' -e '[\u2018]' -e '[\u2019]' -e '[\u201C]' -e '[\u201D]' -e '[\u2026]' )
# echo "::debug::Occorrenze: $num"
# if [ ! "$num" = "0" ] ; then
# echo "::error trovate $num occorrenze di caratteri non permessi"
# fi
# git diff --name-only e2ec2669247fb8a6643e6456205a0faf821156de 55ebacd78d0e1244db5654cc1daa71a229450d4c content/