From d1de07df2fb5d88a043102de8f192d2cbc03b005 Mon Sep 17 00:00:00 2001 From: paspo Date: Fri, 9 Aug 2024 21:34:25 +0200 Subject: [PATCH] test 20 --- .gitea/workflows/markdownlint_pr.sh | 9 +++++ .gitea/workflows/unicode_check.yaml | 52 ++++++++++++++++------------- 2 files changed, 38 insertions(+), 23 deletions(-) create mode 100644 .gitea/workflows/markdownlint_pr.sh diff --git a/.gitea/workflows/markdownlint_pr.sh b/.gitea/workflows/markdownlint_pr.sh new file mode 100644 index 0000000..84f6353 --- /dev/null +++ b/.gitea/workflows/markdownlint_pr.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +echo "Initial commit: $1" +echo "Final commit: $2" +echo "File list:" +while read -r LINE; do + echo "$LINE" + mdl --config .markdownlint.yaml "$LINE" +done < <(git diff --name-only $1 $2 content/ | grep \.md$) diff --git a/.gitea/workflows/unicode_check.yaml b/.gitea/workflows/unicode_check.yaml index 47e7aa3..8dc7f5f 100644 --- a/.gitea/workflows/unicode_check.yaml +++ b/.gitea/workflows/unicode_check.yaml @@ -14,27 +14,33 @@ jobs: with: fetch-depth: 0 - - name: Getting changed files - id: file-lister - shell: bash - run: | - echo "Initial commit: ${{ github.event.pull_request.base.sha }}" - echo "Final commit: ${{ github.event.pull_request.head.sha }}" - echo "File list:" - while read LINE; do - echo $LINE - LINASDASDSAE=$(printf %q "$LINE") - F="$F $(echo "${LINE}"|sed 's/\ /\\ /')" - done < <(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep \.md$) - echo "FILELIST=$F" >> "$GITHUB_OUTPUT" - - - name: Markdown Lint - env: - FILELIST: ${{ steps.file-lister.outputs.FILELIST }} - uses: nosborn/github-action-markdown-cli@v3.3.0 + - name: vai + uses: docker://registry.gitlab.com/pipeline-components/markdownlint:latest with: - files: "${{ env.FILELIST }}" - # entrypoint: /bin/sh - # args: -c 'set' - config_file: .markdownlint.yaml - dot: false + 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 }}' + + # - name: Getting changed files + # id: file-lister + # shell: bash + # run: | + # echo "Initial commit: ${{ github.event.pull_request.base.sha }}" + # echo "Final commit: ${{ github.event.pull_request.head.sha }}" + # echo "File list:" + # while read LINE; do + # echo $LINE + # LINASDASDSAE=$(printf %q "$LINE") + # F="$F $(echo "${LINE}"|sed 's/\ /\\ /')" + # done < <(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} content/ | grep \.md$) + # echo "FILELIST=$F" >> "$GITHUB_OUTPUT" + + # - name: Markdown Lint + # env: + # FILELIST: ${{ steps.file-lister.outputs.FILELIST }} + # uses: nosborn/github-action-markdown-cli@v3.3.0 + # with: + # files: "${{ env.FILELIST }}" + # # entrypoint: /bin/sh + # # args: -c 'set' + # config_file: .markdownlint.yaml + # dot: false