From 7758cb730c1f988e9d631e253953bd67d066bec4 Mon Sep 17 00:00:00 2001 From: Steven Looman Date: Sun, 25 Feb 2024 16:02:38 +0100 Subject: [PATCH] Publish check descriptions to wiki --- .github/workflows/publish-checks-wiki.yml | 36 +++++++++++++++++++++++ wiki/.gitignore | 0 2 files changed, 36 insertions(+) create mode 100644 .github/workflows/publish-checks-wiki.yml create mode 100644 wiki/.gitignore diff --git a/.github/workflows/publish-checks-wiki.yml b/.github/workflows/publish-checks-wiki.yml new file mode 100644 index 00000000..2acc37c2 --- /dev/null +++ b/.github/workflows/publish-checks-wiki.yml @@ -0,0 +1,36 @@ +name: Publish checks to wiki +on: + push: + branches: [develop, checks-to-wiki] + paths: + - wiki/** + - .github/workflows/publish-checks-wiki.yml +concurrency: + group: publish-checks-wiki + cancel-in-progress: true +permissions: + contents: write +jobs: + publish-wiki: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - run: | + pwd + find . + - run: | + python3 -m pip install --upgrade pip + python3 -m pip install html2text + - run: | + mkdir -p wiki/checks + for f in magik-checks/src/main/resources/nl/ramsolutions/sw/sonar/l10n/magik/rules/*.html + do + name=$(basename $f .html) + html2text -b 0 $f > wiki/checks/$name.md + done + - uses: Andrew-Chen-Wang/github-wiki-action@v4 + with: + path: wiki/checks + dry-run: true diff --git a/wiki/.gitignore b/wiki/.gitignore new file mode 100644 index 00000000..e69de29b