bglug.it/.gitea/workflows/unicode_check.yaml

41 lines
1.2 KiB
YAML
Raw Normal View History

2024-08-04 10:27:38 +02:00
---
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
2024-08-04 12:58:52 +02:00
with:
2024-08-04 13:25:48 +02:00
fetch-depth: 0
2024-08-04 10:27:38 +02:00
2024-08-07 21:23:38 +02:00
- name: Getting changed files
2024-08-07 21:15:41 +02:00
id: file-lister
2024-08-07 22:25:28 +02:00
shell: bash
2024-08-04 10:27:38 +02:00
run: |
2024-08-07 21:23:38 +02:00
echo "Initial commit: ${{ github.event.pull_request.base.sha }}"
echo "Final commit: ${{ github.event.pull_request.head.sha }}"
2024-08-08 20:25:26 +02:00
echo "File list:"
2024-08-07 22:25:28 +02:00
while read LINE; do
2024-08-08 20:25:26 +02:00
echo $LINE
LINASDASDSAE=$(printf %q "$LINE")
F="$F $(echo "${LINE}"|sed 's/\ /\\ /')"
2024-08-07 22:25:28 +02:00
done < <(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep \.md$)
2024-08-07 21:23:38 +02:00
echo "FILELIST=$F" >> "$GITHUB_OUTPUT"
2024-08-07 21:15:41 +02:00
2024-08-08 20:25:26 +02:00
- name: Markdown Lint
2024-08-08 19:46:17 +02:00
env:
FILELIST: ${{ steps.file-lister.outputs.FILELIST }}
2024-08-07 21:15:41 +02:00
uses: nosborn/github-action-markdown-cli@v3.3.0
with:
2024-08-08 20:25:26 +02:00
files: "${{ env.FILELIST }}"
# entrypoint: /bin/sh
# args: -c 'set'
2024-08-07 21:15:41 +02:00
config_file: .markdownlint.yaml
dot: false