From b0ea98b13cb5776a81c026dfe312ace6f5a4c31e Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 16:41:32 +0100 Subject: [PATCH 1/7] use linkspector to check links --- .github/config/.linkspector.yml | 14 ++++++++++++++ .github/workflows/markdown.yaml | 19 ++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) create mode 100644 .github/config/.linkspector.yml diff --git a/.github/config/.linkspector.yml b/.github/config/.linkspector.yml new file mode 100644 index 0000000..3af9edd --- /dev/null +++ b/.github/config/.linkspector.yml @@ -0,0 +1,14 @@ +# https://github.com/UmbrellaDocs/linkspector?tab=readme-ov-file#configuration +dirs: + - . +useGitIgnore: true +aliveStatusCodes: + - 200 + - 201 + - 204 + - 206 + - 429 +ignorePatterns: + - pattern: '^https://localhost' + - pattern: '^https://github.com/orgs/zaphiro-technologies/' + - pattern: '^https://github.com/zaphiro-technologies/' \ No newline at end of file diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 3e81991..747d74b 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -38,7 +38,7 @@ on: type: boolean config-links-path: required: false - default: '.github/config/md-link-config.json' + default: '.github/config/.linkspector.yml' type: string config-lint-path: default: '.github/config/.markdownlint.json' @@ -72,7 +72,7 @@ jobs: scripts: - '.github/config/.markdownlint.json' - '.github/config/.prettierignore' - - '.github/config/md-link-config.json' + - '.github/config/.linkspector.yml' - '.gramma.json' - '.grammarignore' - 'grammar-check.sh' @@ -113,18 +113,11 @@ jobs: rm -fr */vendor # Checks the status of hyperlinks in .md and .MD files in verbose mode (the action is case sensitive and .{MD,md}) - name: Check links (.md) - uses: gaurav-nelson/github-action-markdown-link-check@v1 + uses: umbrelladocs/action-linkspector@v1 with: - config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }} - use-verbose-mode: 'yes' - use-quiet-mode: 'yes' - - name: Check links (.MD) - uses: gaurav-nelson/github-action-markdown-link-check@v1 - with: - config-file: ${{ inputs.config-link-path || '.github/config/md-link-config.json' }} - use-verbose-mode: 'yes' - use-quiet-mode: 'yes' - file-extension: '.MD' + filter_mode: nofilter + reporter: github-pr-review + config_file: ${{ inputs.config-link-path || '.github/config/.linkspector.yml' }} markdown-spellchecker: runs-on: ubuntu-latest needs: changes From b3da1b9bb64ec4f98b08253b3b8b94e8b980a817 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 17:35:10 +0100 Subject: [PATCH 2/7] Update markdown.yaml --- .github/workflows/markdown.yaml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 747d74b..0118251 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -108,9 +108,6 @@ jobs: git config --global user.email 'bot@zaphiro.ch' git commit -am "Automated markdown-lint fixes [dependabot skip]" || echo "No changes to commit" git push - shopt -s globstar - rm -fr vendor - rm -fr */vendor # Checks the status of hyperlinks in .md and .MD files in verbose mode (the action is case sensitive and .{MD,md}) - name: Check links (.md) uses: umbrelladocs/action-linkspector@v1 From 5625bc98b20c048a69160474ee15718f3e496c6f Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 17:42:26 +0100 Subject: [PATCH 3/7] Update markdown.yaml --- .github/workflows/markdown.yaml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 0118251..916b742 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -108,8 +108,9 @@ jobs: git config --global user.email 'bot@zaphiro.ch' git commit -am "Automated markdown-lint fixes [dependabot skip]" || echo "No changes to commit" git push - # Checks the status of hyperlinks in .md and .MD files in verbose mode (the action is case sensitive and .{MD,md}) - - name: Check links (.md) + - name: Fix apparmor issue for puppeteer + run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns + - name: Check links uses: umbrelladocs/action-linkspector@v1 with: filter_mode: nofilter From 1ac37706ff56bd64080f7c8894e7e4959fd994d6 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 18:03:29 +0100 Subject: [PATCH 4/7] Update markdown.yaml --- .github/workflows/markdown.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 916b742..1ddfad3 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -116,6 +116,7 @@ jobs: filter_mode: nofilter reporter: github-pr-review config_file: ${{ inputs.config-link-path || '.github/config/.linkspector.yml' }} + fail_on_error: true markdown-spellchecker: runs-on: ubuntu-latest needs: changes From de9e59fb47bd2a8b9a831afeaceb57347adcec14 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 20:56:46 +0100 Subject: [PATCH 5/7] Update markdown.yaml --- .github/workflows/markdown.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index 1ddfad3..f7f07e5 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -110,6 +110,31 @@ jobs: git push - name: Fix apparmor issue for puppeteer run: echo 0 | sudo tee /proc/sys/kernel/apparmor_restrict_unprivileged_userns + - name: Default configuration for link checker + run: | + FILE=${{ inputs.config-link-path || '.github/config/.linkspector.yml' }} + if [ -f $FILE ]; then + echo "'$FILE' Exists" + else + # Write content to the file + cat < "$FILE" + dirs: + - . + excludedDirs: + - vendor + useGitIgnore: true + aliveStatusCodes: + - 200 + - 201 + - 204 + - 206 + - 429 + ignorePatterns: + - pattern: '^http(s?)://localhost' + - pattern: '^https://github.com/orgs/zaphiro-technologies/' + - pattern: '^https://github.com/zaphiro-technologies/' + EOF + fi - name: Check links uses: umbrelladocs/action-linkspector@v1 with: From eed641b004908e2e8d9681def817b4686c0e6c25 Mon Sep 17 00:00:00 2001 From: "Federico M. Facca" Date: Tue, 17 Dec 2024 20:58:15 +0100 Subject: [PATCH 6/7] Update markdown.yaml --- .github/workflows/markdown.yaml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/.github/workflows/markdown.yaml b/.github/workflows/markdown.yaml index f7f07e5..b4671b8 100644 --- a/.github/workflows/markdown.yaml +++ b/.github/workflows/markdown.yaml @@ -118,22 +118,22 @@ jobs: else # Write content to the file cat < "$FILE" - dirs: - - . - excludedDirs: - - vendor - useGitIgnore: true - aliveStatusCodes: - - 200 - - 201 - - 204 - - 206 - - 429 - ignorePatterns: - - pattern: '^http(s?)://localhost' - - pattern: '^https://github.com/orgs/zaphiro-technologies/' - - pattern: '^https://github.com/zaphiro-technologies/' - EOF + dirs: + - . + excludedDirs: + - vendor + useGitIgnore: true + aliveStatusCodes: + - 200 + - 201 + - 204 + - 206 + - 429 + ignorePatterns: + - pattern: '^http(s?)://localhost' + - pattern: '^https://github.com/orgs/zaphiro-technologies/' + - pattern: '^https://github.com/zaphiro-technologies/' + EOF fi - name: Check links uses: umbrelladocs/action-linkspector@v1 From 4c4a35e21d3fd4d8e8bd95420a15094408b0a4a7 Mon Sep 17 00:00:00 2001 From: cosimomeli Date: Wed, 18 Dec 2024 08:29:54 +0000 Subject: [PATCH 7/7] docs(release_notes): update RELEASE_NOTES.md [dependabot skip] --- RELEASE_NOTES.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 707f594..855808b 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,9 +1,11 @@ # GitHub Workflows Release Notes -## 0.0.3-dev - 2024-12-16 +## 0.0.3-dev - 2024-12-18 ### Features +- Use [linkspector](https://github.com/UmbrellaDocs/linkspector) to check links + (PR #148 by @chicco785) - docker workflow: add javascript mode for cache (PR #146 by @chicco785) - Add workflow to create a new release (PR #145 by @chicco785) - golang workflow: include `.sql` and `.docker/*.yml` files in golang changes