diff --git a/.github/workflows/broken-links.yml b/.github/workflows/broken-links.yml index 887239b3..eae41807 100644 --- a/.github/workflows/broken-links.yml +++ b/.github/workflows/broken-links.yml @@ -12,25 +12,17 @@ jobs: - uses: actions/checkout@v3 - name: Generate link check config with internal link replacement patterns run: | - jq --arg ws "$GITHUB_WORKSPACE" '. + { + jq --arg ws "/github/workspace" '. + { "replacementPatterns": [ {"pattern": "^(/[^#?]+/)$", "replacement": ("file://" + $ws + "$1")}, {"pattern": "^(/[^#?.]+)$", "replacement": ("file://" + $ws + "$1.md")}, {"pattern": "^(/[^#?]+\\.[A-Za-z0-9]+)$", "replacement": ("file://" + $ws + "$1")} ] }' \ - .github/workflows/markdown.links.config.json > "$RUNNER_TEMP/mlc.config.json" + .github/workflows/markdown.links.config.json > "$GITHUB_WORKSPACE/.github/workflows/mlc.config.generated.json" - uses: gaurav-nelson/github-action-markdown-link-check@v1 id: checker with: use-quiet-mode: 'yes' use-verbose-mode: 'yes' - config-file: '${{ runner.temp }}/mlc.config.json' - - uses: slackapi/slack-github-action@v1 - if: failure() - id: slack - with: - payload: '{"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"Website Broken Link Check Status : *${{steps.checker.outcome}}*. \n\n Details : https://github.com/${{github.repository}}/actions/runs/${{github.run_id}} "}}]}' - env: - SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} - SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + config-file: '.github/workflows/mlc.config.generated.json' diff --git a/.github/workflows/markdown.links.config.json b/.github/workflows/markdown.links.config.json index 2c78653f..f4e875fc 100644 --- a/.github/workflows/markdown.links.config.json +++ b/.github/workflows/markdown.links.config.json @@ -16,7 +16,7 @@ { "pattern" : "^https?://podcasts\\.apple\\.com/"}, { "pattern" : "^https://subnero\\.com/solutions/swan\\.html"} ], - "aliveStatusCodes": [200, 202, 206, 301, 302, 303, 304, 403, 429, 999], + "aliveStatusCodes": [200, 202, 206, 301, 302, 303, 304, 403, 418, 429, 999], "retryOn429": true, "retryCount": 5, "fallbackRetryDelay": "30s",