forked from BgLUG/bglug.it
unicode check action #1
15
.gitea/workflows/markdownlint_pr.sh
Normal file → Executable file
15
.gitea/workflows/markdownlint_pr.sh
Normal file → Executable file
@ -1,9 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo
|
||||
echo "Initial commit: $1"
|
||||
echo "Final commit: $2"
|
||||
echo ""
|
||||
echo
|
||||
|
||||
# recupera ogni file modificato in questa PR (tra le 2 commit)
|
||||
# considera solo i file che terminano con .md
|
||||
# ogni file viene controllato con markdownlint, con la config comune
|
||||
|
||||
while read -r LINE; do
|
||||
echo ""
|
||||
mdl --config .markdownlint.yaml "$LINE"
|
||||
done < <(git diff --name-only $1 $2 content/ | grep \.md$)
|
||||
echo
|
||||
echo "testing file: $LINE"
|
||||
markdownlint --config .markdownlint.yaml "$LINE"
|
||||
done < <(git diff --name-only "$1" "$2" content/ | grep \.md$)
|
||||
|
@ -15,10 +15,10 @@ jobs:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: vai
|
||||
uses: docker://registry.gitlab.com/pipeline-components/markdownlint:latest
|
||||
uses: docker://ghcr.io/igorshubovych/markdownlint-cli
|
||||
with:
|
||||
entrypoint: /bin/sh
|
||||
args: -c 'apk -U add bash ; bash .gitea/workflows/markdownlint_pr.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}'
|
||||
args: -c 'apk -U add git bash ; bash .gitea/workflows/markdownlint_pr.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}'
|
||||
|
||||
# - name: Getting changed files
|
||||
# id: file-lister
|
||||
|
@ -1,7 +1,4 @@
|
||||
---
|
||||
# vedi: https://github.com/DavidAnson/markdownlint/blob/main/schema/.markdownlint.yaml
|
||||
|
||||
default: true
|
||||
MD013: false
|
||||
# line_length: 8000
|
||||
|
||||
# MD013: { stern: true }
|
||||
# MD024: { siblings_only: true }
|
||||
|
@ -6,5 +6,6 @@ invalid char: `’`
|
||||
|
||||
asd’asd
|
||||
|
||||
|
||||
asdaksjdlaj slkas jdlkajs ldkasj lkasj dlkasjdlk ajsldkajs dlkjasklsaj lkaj sldkj lkej lkeajf alsdkjf asldkfj
|
||||
anche!!!
|
||||
|
Loading…
x
Reference in New Issue
Block a user