├── .checkov.yml ├── .dockerignore ├── .github ├── CODEOWNERS ├── ISSUE_TEMPLATE │ ├── bug_report.md │ ├── config.yml │ └── proposal.md ├── renovate.json5 └── workflows │ ├── codeql-actions.yml │ ├── docker-image.yml │ ├── markdown-check.yml │ ├── mega-linter.yml │ ├── pr-slack-notification.yml │ ├── readme-commands-check.yml │ ├── release-please.yml │ ├── renovate.yml │ ├── scorecards.yml │ ├── semantic-pull-request.yml │ ├── stale.yml │ └── tests.yml ├── .gitignore ├── .lycheeignore ├── .markdownlint.yml ├── .mega-linter.yml ├── CHANGELOG.md ├── Dockerfile ├── LICENSE ├── README.md ├── SECURITY.md ├── action.yml ├── demo └── my-markdown-link-checker-demo.sh ├── entrypoint.sh ├── lychee.toml └── tests ├── test-bad-mdfile └── bad.md ├── test1 ├── CHANGELOG.md └── excluded_file.md └── test2 └── normal.md /.checkov.yml: -------------------------------------------------------------------------------- 1 | skip-check: 2 | # The build output cannot be affected by user parameters other than the build entry point and the top-level source location. GitHub Actions workflow_dispatch inputs MUST be empty 3 | - CKV_GHA_7 4 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # keep-sorted start 2 | *.yml 3 | .*.yaml 4 | .git 5 | .github 6 | demo 7 | images 8 | tests 9 | # keep-sorted end 10 | -------------------------------------------------------------------------------- /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | # GitHub CODEOWNERS file 2 | # Documentation: 3 | # - https://help.github.com/articles/about-code-owners/ 4 | # - https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners 5 | 6 | # Syntax: 7 | # pattern @user-or-team 8 | # The last matching pattern takes precedence. 9 | 10 | ############################### 11 | # Repository Default Owners 12 | ############################### 13 | # These owners will be the default owners for everything in the repo 14 | * @ruzickap 15 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug_report.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Bug report 3 | about: Create a report to help us improve 4 | title: "Bug: This is a sample issue title" 5 | labels: bug 6 | assignees: ruzickap 7 | --- 8 | 9 | **Describe the bug** 10 | A clear and concise description of what the bug is. 11 | 12 | **To Reproduce** 13 | Steps to reproduce the behaviour. 14 | 15 | **Expected behaviour** 16 | A clear and concise description of what you expected to happen. 17 | 18 | **Screenshots** 19 | If applicable, add screenshots to help explain your problem. 20 | 21 | **Additional context** 22 | Add any other context about the problem here. 23 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: GitHub Actions Community Forum 4 | url: https://github.com/orgs/community/discussions/ 5 | about: Please ask questions about GitHub Actions here. 6 | - name: GitHub Pages help 7 | url: https://help.github.com/en/github/working-with-github-pages 8 | about: GitHub Pages documentation here. 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/proposal.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Proposal 3 | about: Suggest an idea for this project 4 | title: "Proposal: This is a sample title" 5 | labels: proposal 6 | assignees: ruzickap 7 | --- 8 | 9 | **Is your feature request related to a problem? Please describe** 10 | A clear and concise description of what the problem is. Ex. I'm always 11 | frustrated when [...] 12 | 13 | **Describe the solution you'd like** 14 | A clear and concise description of what you want to happen. 15 | 16 | **Describe alternatives you've considered** 17 | A clear and concise description of any alternative solutions or features you've considered. 18 | 19 | **Additional context** 20 | Add any other context or screenshots about the feature request here. 21 | -------------------------------------------------------------------------------- /.github/renovate.json5: -------------------------------------------------------------------------------- 1 | { 2 | $schema: "https://docs.renovatebot.com/renovate-schema.json", 3 | // # keep-sorted start block=yes 4 | "git-submodules": { 5 | enabled: true, 6 | }, 7 | // Keep the extends started with ":" at the end of the list to allow overriding 8 | extends: [ 9 | "config:recommended", 10 | "docker:pinDigests", 11 | "helpers:pinGitHubActionDigestsToSemver", 12 | "security:openssf-scorecard", 13 | ":disableDependencyDashboard", 14 | ":disableRateLimiting", 15 | ":docker", 16 | ":enableVulnerabilityAlertsWithLabel(security)", 17 | ":pinSkipCi", 18 | ], 19 | labels: [ 20 | "renovate", 21 | "renovate/{{replace '.*/' '' depName}}", 22 | "renovate/{{updateType}}", 23 | ], 24 | lockFileMaintenance: { 25 | enabled: true, 26 | schedule: ["before 6am on Sunday"], 27 | }, 28 | // Package update rules 29 | packageRules: [ 30 | { 31 | description: "Disable auto-merge for major updates", 32 | matchUpdateTypes: ["major"], 33 | automerge: false, 34 | }, 35 | { 36 | description: "Ignore frequent renovate updates", 37 | enabled: false, 38 | matchPackageNames: ["renovatebot/github-action"], 39 | matchUpdateTypes: ["patch"], 40 | }, 41 | { 42 | description: "Update renovatebot/github-action minor updates on Sundays", 43 | matchPackageNames: ["renovatebot/github-action"], 44 | matchUpdateTypes: ["minor"], 45 | schedule: ["* * * * 0"], 46 | }, 47 | ], 48 | prBodyTemplate: "{{{table}}}{{{notes}}}{{{changelogs}}}", 49 | rebaseWhen: "behind-base-branch", 50 | // Custom version extraction 51 | regexManagers: [ 52 | { 53 | extractVersionTemplate: "{{#if extractVersion}}{{{extractVersion}}}{{else}}^v?(?.+)${{/if}}", 54 | fileMatch: ["\\.ya?ml$", "\\.md$", "^Dockerfile$", "^entrypoint\\.sh$"], 55 | matchStrings: [ 56 | '# renovate: datasource=(?.+?) depName=(?.+?)( versioning=(?.+?))?( extractVersion=(?.+?))?( registryUrl=(?.+?))?\\s.*[=:]\\s*"?(?.+?)"?\\s', 57 | ], 58 | versioningTemplate: "{{#if versioning}}{{{versioning}}}{{else}}semver{{/if}}", 59 | }, 60 | ], 61 | separateMinorPatch: true, 62 | // # keep-sorted end 63 | } 64 | -------------------------------------------------------------------------------- /.github/workflows/codeql-actions.yml: -------------------------------------------------------------------------------- 1 | name: CodeQL GitHub Actions 2 | 3 | on: 4 | workflow_dispatch: 5 | push: 6 | branches: ["main"] 7 | pull_request: 8 | paths: 9 | - .github/workflows/*.yml 10 | schedule: 11 | - cron: 17 10 * * 2 12 | 13 | permissions: read-all 14 | 15 | jobs: 16 | analyze-actions: 17 | name: Analyze GitHub Actions 18 | runs-on: ubuntu-latest 19 | permissions: 20 | security-events: write 21 | packages: read 22 | steps: 23 | - name: Checkout repository 24 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 25 | 26 | - name: Initialize CodeQL 27 | uses: github/codeql-action/init@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 28 | with: 29 | languages: actions 30 | build-mode: none 31 | queries: security-extended 32 | 33 | - name: Perform CodeQL Analysis 34 | uses: github/codeql-action/analyze@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 35 | with: 36 | category: "/language:actions" 37 | -------------------------------------------------------------------------------- /.github/workflows/docker-image.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: docker-image 3 | 4 | on: 5 | workflow_dispatch: 6 | pull_request: 7 | types: [opened, synchronize] 8 | paths: 9 | - .dockerignore 10 | - .github/workflows/docker-image.yml 11 | - Dockerfile 12 | - entrypoint.sh 13 | push: 14 | branches: 15 | - main 16 | paths: 17 | - .dockerignore 18 | - .github/workflows/docker-image.yml 19 | - Dockerfile 20 | - entrypoint.sh 21 | 22 | permissions: read-all 23 | 24 | jobs: 25 | docker-image: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 29 | 30 | - name: Build test 31 | run: docker build . --file Dockerfile 32 | -------------------------------------------------------------------------------- /.github/workflows/markdown-check.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: markdown-check 3 | 4 | on: 5 | workflow_dispatch: 6 | push: 7 | branches-ignore: 8 | - main 9 | paths: 10 | - "**.md" 11 | - .github/workflows/markdown-check.yml 12 | - .markdownlint.yml 13 | 14 | permissions: read-all 15 | 16 | jobs: 17 | markdownlint-check: 18 | runs-on: ubuntu-latest 19 | steps: 20 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 21 | 22 | - name: Markdown Lint 23 | uses: ruzickap/action-my-markdown-linter@26b4129bf0352527e60b5bd739357af63df1b7bf # v1.2.0 24 | with: 25 | exclude: | 26 | tests/ 27 | CHANGELOG.md 28 | 29 | markdown-link-check: 30 | runs-on: ubuntu-latest 31 | steps: 32 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 33 | 34 | - name: Link Checker 35 | uses: ruzickap/action-my-markdown-link-checker@51aa9a3a3c6781804a3660ff105f650ac44c56e4 # v1.4.0 36 | with: 37 | exclude: | 38 | tests/ 39 | CHANGELOG.md 40 | -------------------------------------------------------------------------------- /.github/workflows/mega-linter.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: mega-linter 3 | 4 | on: 5 | workflow_dispatch: 6 | push: 7 | branches-ignore: 8 | - main 9 | 10 | permissions: read-all 11 | 12 | jobs: 13 | github-context: 14 | runs-on: ubuntu-latest 15 | steps: 16 | - name: Debug 17 | env: 18 | GITHUB_CONTEXT: ${{ toJson(github) }} 19 | run: | 20 | echo "${GITHUB_CONTEXT}" 21 | 22 | mega-linter: 23 | runs-on: ubuntu-latest 24 | if: ${{ (!startsWith(github.ref_name, 'renovate/') && !startsWith(github.ref_name, 'release-please--')) || github.event_name == 'workflow_dispatch' }} 25 | timeout-minutes: 30 26 | steps: 27 | - name: Checkout Code 28 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 29 | 30 | - name: Extract commands from markdown files 31 | run: | 32 | set -euxo pipefail 33 | eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" 34 | brew install mdq 35 | echo '#!/usr/bin/env bash' > README.sh 36 | readarray -d '' MD_FILES < <(find . -type f -name "*.md" -print0) 37 | mdq '```/^bash$|^shell$|^sh$/' --br -o plain "${MD_FILES[@]}" >> README.sh || true 38 | chmod a+x README.sh 39 | 40 | - name: 💡 MegaLinter 41 | uses: oxsecurity/megalinter@e08c2b05e3dbc40af4c23f41172ef1e068a7d651 # v8.8.0 42 | env: 43 | GITHUB_COMMENT_REPORTER: false 44 | # Disabled due to error: [GitHub Status Reporter] Error posting Status for REPOSITORY with ...: 403 45 | GITHUB_STATUS_REPORTER: false 46 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} 47 | -------------------------------------------------------------------------------- /.github/workflows/pr-slack-notification.yml: -------------------------------------------------------------------------------- 1 | name: pr-slack-notification 2 | 3 | # Based on: https://github.com/slackapi/slack-github-action/issues/269 4 | 5 | on: 6 | workflow_dispatch: 7 | pull_request: 8 | types: 9 | - opened 10 | - ready_for_review 11 | - review_requested 12 | - closed 13 | issue_comment: 14 | types: 15 | - created 16 | pull_request_review: 17 | types: 18 | - submitted 19 | 20 | permissions: read-all 21 | 22 | defaults: 23 | run: 24 | shell: bash -euxo pipefail {0} 25 | 26 | jobs: 27 | github-context: 28 | runs-on: ubuntu-latest 29 | steps: 30 | - name: Debug 31 | env: 32 | GITHUB_CONTEXT: ${{ toJson(github) }} 33 | run: | 34 | echo "${GITHUB_CONTEXT}" 35 | 36 | pr-slack-notification: 37 | runs-on: ubuntu-latest 38 | name: Sends a message to Slack when a PR is opened 39 | if: (github.event.action == 'opened' && github.event.pull_request.draft == false) || github.event.action == 'ready_for_review' 40 | steps: 41 | - name: Post PR summary message to slack 42 | id: message 43 | uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 44 | with: 45 | method: chat.postMessage 46 | token: ${{ secrets.MY_SLACK_BOT_TOKEN }} 47 | payload: | 48 | channel: ${{ secrets.MY_SLACK_CHANNEL_ID }} 49 | text: "💡 *${{ github.event.pull_request.user.login }}*: <${{ github.event.repository.html_url }}|${{ github.repository }}> - <${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}> (+${{ github.event.pull_request.additions }}, -${{ github.event.pull_request.deletions }})" 50 | 51 | - name: Create file with slack message timestamp 52 | env: 53 | TS: ${{ steps.message.outputs.ts }} 54 | run: | 55 | echo "${TS}" > slack-message-timestamp.txt 56 | 57 | - name: Cache slack message timestamp 58 | uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 59 | with: 60 | path: slack-message-timestamp.txt 61 | key: slack-message-timestamp-${{ github.event.pull_request.html_url }}-${{ steps.message.outputs.ts }} 62 | 63 | slack-emoji-react: 64 | runs-on: ubuntu-latest 65 | name: Adds emoji reaction to slack message when a PR is closed or reviewed 66 | if: ${{ startsWith(github.event.pull_request.html_url, 'https') || startsWith(github.event.issue.pull_request.html_url, 'https') }} 67 | steps: 68 | # gh commands needs to be executed in the repository 69 | - name: Checkout Code 70 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 71 | 72 | # https://stackoverflow.com/questions/74640750/github-actions-not-finding-cache 73 | # I cannot use the cache action in this job because the cache is not shared between runs 74 | - name: Save slack timestamp as an environment variable 75 | id: slack-timestamp 76 | env: 77 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} 78 | GITHUB_PULL_REQUEST_HTML_URL: ${{ github.event.pull_request.html_url || github.event.issue.pull_request.html_url }} 79 | run: | 80 | SLACK_TIMESTAMP=$(gh cache list --json key --jq "[.[].key|capture(\"${GITHUB_PULL_REQUEST_HTML_URL}-(?.+)\").x][0]") 81 | echo "SLACK_TIMESTAMP=${SLACK_TIMESTAMP}" | tee -a "${GITHUB_ENV}" 82 | if [[ "${SLACK_TIMESTAMP}" != '' ]]; then 83 | echo "github_event_pull_request_html_url=true" >> "${GITHUB_OUTPUT}" 84 | fi 85 | 86 | - name: Decide which emoji to add 87 | if: ${{ steps.slack-timestamp.outputs.github_event_pull_request_html_url == 'true' }} 88 | env: 89 | GITHUB_EVENT_ACTION: ${{ github.event.action }} 90 | GITHUB_EVENT_NAME: ${{ github.event_name }} 91 | GITHUB_EVENT_REVIEW_STATE: ${{ github.event.review.state }} 92 | run: | 93 | case "${GITHUB_EVENT_ACTION}" in 94 | created) 95 | if [[ "${GITHUB_EVENT_NAME}" == 'issue_comment' ]]; then 96 | echo "EMOJI=speech_balloon" >> "${GITHUB_ENV}" # 💬 97 | fi 98 | ;; 99 | submitted) 100 | case "${GITHUB_EVENT_REVIEW_STATE}" in 101 | changes_requested) 102 | echo "EMOJI=repeat" >> "${GITHUB_ENV}" # 🔁 103 | ;; 104 | approved) 105 | echo "EMOJI=ok" >> "${GITHUB_ENV}" # 🆗 106 | ;; 107 | commented) 108 | echo "EMOJI=speech_balloon" >> "${GITHUB_ENV}" # 💬 109 | ;; 110 | esac 111 | ;; 112 | review_requested) 113 | echo "EMOJI=eyes" >> "${GITHUB_ENV}" # 👀 114 | ;; 115 | *) 116 | echo "EMOJI=false" >> "${GITHUB_ENV}" 117 | ;; 118 | esac 119 | 120 | - name: React to PR summary message in slack with emoji 121 | if: ${{ steps.slack-timestamp.outputs.github_event_pull_request_html_url == 'true' && env.EMOJI != 'false' }} 122 | uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 123 | with: 124 | method: reactions.add 125 | token: ${{ secrets.MY_SLACK_BOT_TOKEN }} 126 | payload: | 127 | channel: ${{ secrets.MY_SLACK_CHANNEL_ID }} 128 | timestamp: "${{ env.SLACK_TIMESTAMP }}" 129 | name: ${{ env.EMOJI }} 130 | 131 | - name: Update the original message with status Merged ✅ 132 | if: ${{ github.event.pull_request.merged && steps.slack-timestamp.outputs.github_event_pull_request_html_url == 'true' }} 133 | uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 134 | with: 135 | method: chat.update 136 | token: ${{ secrets.MY_SLACK_BOT_TOKEN }} 137 | payload: | 138 | channel: ${{ secrets.MY_SLACK_CHANNEL_ID }} 139 | ts: "${{ env.SLACK_TIMESTAMP }}" 140 | text: "✅ *${{ github.event.pull_request.user.login }}*: <${{ github.event.repository.html_url }}|${{ github.repository }}> - <${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}> (+${{ github.event.pull_request.additions }}, -${{ github.event.pull_request.deletions }})" 141 | attachments: 142 | - color: "28a745" 143 | fields: 144 | - title: "Status" 145 | short: true 146 | value: "Merged ✅" 147 | 148 | - name: Update the original message with status Closed ❎ 149 | if: ${{ github.event.action == 'closed' && github.event.pull_request.merged == false && steps.slack-timestamp.outputs.github_event_pull_request_html_url == 'true' }} 150 | uses: slackapi/slack-github-action@b0fa283ad8fea605de13dc3f449259339835fc52 # v2.1.0 151 | with: 152 | method: chat.update 153 | token: ${{ secrets.MY_SLACK_BOT_TOKEN }} 154 | payload: | 155 | channel: ${{ secrets.MY_SLACK_CHANNEL_ID }} 156 | ts: "${{ env.SLACK_TIMESTAMP }}" 157 | text: "❎ *${{ github.event.pull_request.user.login }}*: <${{ github.event.repository.html_url }}|${{ github.repository }}> - <${{ github.event.pull_request.html_url }}|#${{ github.event.pull_request.number }} - ${{ github.event.pull_request.title }}> (+${{ github.event.pull_request.additions }}, -${{ github.event.pull_request.deletions }})" 158 | attachments: 159 | - color: "fa7015" 160 | fields: 161 | - title: "Status" 162 | short: true 163 | value: "Closed ❎" 164 | -------------------------------------------------------------------------------- /.github/workflows/readme-commands-check.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: readme-commands-check 3 | 4 | on: 5 | workflow_dispatch: 6 | pull_request: 7 | types: [opened, synchronize] 8 | paths: 9 | - README.md 10 | - .github/workflows/readme-commands-check.yml 11 | push: 12 | branches: 13 | - main 14 | paths: 15 | - README.md 16 | - .github/workflows/readme-commands-check.yml 17 | 18 | permissions: read-all 19 | 20 | jobs: 21 | readme-commands-check: 22 | runs-on: ubuntu-latest 23 | steps: 24 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 25 | 26 | - name: Run commands in README.md file 27 | run: sed -n "/^\`\`\`bash.*/,/^\`\`\`$/p" README.md | sed "/^\`\`\`*/d" | bash -euxo pipefail 28 | -------------------------------------------------------------------------------- /.github/workflows/release-please.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: release-please 3 | 4 | on: 5 | workflow_dispatch: 6 | push: 7 | branches: 8 | - main 9 | 10 | permissions: read-all 11 | 12 | jobs: 13 | release-please-pr: 14 | runs-on: ubuntu-latest 15 | permissions: 16 | contents: write 17 | pull-requests: write 18 | steps: 19 | - uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0 20 | with: 21 | release-type: simple 22 | skip-github-release: true 23 | 24 | release-please-release: 25 | runs-on: ubuntu-latest 26 | permissions: 27 | contents: write 28 | steps: 29 | - uses: googleapis/release-please-action@a02a34c4d625f9be7cb89156071d8567266a2445 # v4.2.0 30 | id: release 31 | with: 32 | release-type: simple 33 | skip-github-pull-request: true 34 | 35 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 36 | 37 | - name: Tag major and minor versions 38 | if: ${{ steps.release.outputs.release_created }} 39 | run: | 40 | git config user.name github-actions[bot] 41 | git config user.email 41898282+github-actions[bot]@users.noreply.github.com 42 | git remote add gh-token "https://${GITHUB_TOKEN}@github.com/googleapis/release-please-action.git" 43 | git tag -d v${{ steps.release.outputs.major }} || true 44 | git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true 45 | git push origin :v${{ steps.release.outputs.major }} || true 46 | git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true 47 | git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}" 48 | git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}" 49 | git push origin v${{ steps.release.outputs.major }} 50 | git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} 51 | -------------------------------------------------------------------------------- /.github/workflows/renovate.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: renovate 3 | 4 | on: 5 | workflow_dispatch: 6 | inputs: 7 | dryRun: 8 | type: boolean 9 | description: Dry-Run 10 | logLevel: 11 | type: choice 12 | description: Log-Level 13 | default: debug 14 | options: 15 | - info 16 | - debug 17 | - trace 18 | push: 19 | branches: 20 | - main 21 | - "!renovate/*" 22 | schedule: 23 | - cron: 0 0-3 * * 0 24 | 25 | env: 26 | # keep-sorted start 27 | # https://docs.renovatebot.com/troubleshooting/#log-debug-levels 28 | LOG_LEVEL: ${{ inputs.logLevel || 'debug' }} 29 | RENOVATE_AUTOMERGE: "true" 30 | # Renovate Automerge 31 | RENOVATE_AUTOMERGE_TYPE: branch 32 | # https://docs.renovatebot.com/self-hosted-configuration/#dryrun 33 | # Run renovate in dry-run mode if executed in branches other than main to prevent updating versions in PRs/branches 34 | RENOVATE_DRY_RUN: ${{ inputs.dryRun || ( github.head_ref || github.ref_name ) != 'main' || false }} 35 | # https://docs.renovatebot.com/configuration-options/#platformcommit 36 | RENOVATE_PLATFORM_COMMIT: "true" 37 | # https://docs.renovatebot.com/self-hosted-configuration/#repositories 38 | RENOVATE_REPOSITORIES: ${{ github.repository }} 39 | # https://docs.renovatebot.com/self-hosted-configuration/#username 40 | RENOVATE_USERNAME: ${{ github.repository_owner }} 41 | # keep-sorted end 42 | 43 | permissions: read-all 44 | 45 | jobs: 46 | github-context: 47 | runs-on: ubuntu-latest 48 | steps: 49 | - name: Debug 50 | env: 51 | GITHUB_CONTEXT: ${{ toJson(github) }} 52 | run: | 53 | echo "${GITHUB_CONTEXT}" 54 | 55 | renovate: 56 | runs-on: ubuntu-latest 57 | concurrency: 58 | group: ${{ github.workflow }}-${{ github.ref }} 59 | permissions: write-all 60 | steps: 61 | - name: Checkout 62 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 63 | 64 | - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 65 | id: app-token 66 | with: 67 | app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }} 68 | private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }} 69 | 70 | - name: 💡 Self-hosted Renovate 71 | uses: renovatebot/github-action@19ba43e1bc58ed95c0ba205dee8b1bc0f27b630d # v42.0.0 72 | with: 73 | token: ${{ steps.app-token.outputs.token }} 74 | -------------------------------------------------------------------------------- /.github/workflows/scorecards.yml: -------------------------------------------------------------------------------- 1 | name: scorecards 2 | on: 3 | workflow_dispatch: 4 | push: 5 | branches: 6 | - main 7 | schedule: 8 | - cron: 30 1 * * 6 9 | 10 | permissions: read-all 11 | 12 | jobs: 13 | analysis: 14 | name: Scorecard analysis 15 | runs-on: ubuntu-latest 16 | permissions: 17 | security-events: write 18 | id-token: write 19 | 20 | steps: 21 | - name: Checkout code 22 | uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 23 | with: 24 | persist-credentials: false 25 | 26 | - name: Run analysis 27 | uses: ossf/scorecard-action@05b42c624433fc40578a4040d5cf5e36ddca8cde # v2.4.2 28 | with: 29 | results_file: results.sarif 30 | results_format: sarif 31 | publish_results: true 32 | 33 | - name: Upload to code-scanning 34 | uses: github/codeql-action/upload-sarif@ce28f5bb42b7a9f2c824e633a3f6ee835bab6858 # v3.29.0 35 | with: 36 | sarif_file: results.sarif 37 | -------------------------------------------------------------------------------- /.github/workflows/semantic-pull-request.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: semantic-pull-request 3 | 4 | on: 5 | workflow_dispatch: 6 | pull_request_target: 7 | types: 8 | - opened 9 | - edited 10 | - synchronize 11 | 12 | permissions: 13 | pull-requests: read 14 | 15 | jobs: 16 | semantic-pull-request: 17 | runs-on: ubuntu-latest 18 | steps: 19 | - uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6 20 | id: app-token 21 | with: 22 | app-id: ${{ secrets.MY_RENOVATE_GITHUB_APP_ID }} 23 | private-key: ${{ secrets.MY_RENOVATE_GITHUB_PRIVATE_KEY }} 24 | 25 | - uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3 26 | env: 27 | GITHUB_TOKEN: ${{ steps.app-token.outputs.token }} 28 | -------------------------------------------------------------------------------- /.github/workflows/stale.yml: -------------------------------------------------------------------------------- 1 | --- 2 | name: stale 3 | 4 | on: 5 | workflow_dispatch: 6 | schedule: 7 | - cron: 9 9 * * * 8 | 9 | permissions: 10 | issues: write 11 | pull-requests: write 12 | 13 | jobs: 14 | stale: 15 | runs-on: ubuntu-latest 16 | steps: 17 | - uses: actions/stale@5bef64f19d7facfb25b37b414482c7164d639639 # v9.1.0 18 | with: 19 | # keep-sorted start 20 | close-issue-message: | 21 | This issue has not seen any activity since it was marked stale. 22 | Closing. 23 | close-pr-message: | 24 | This pull request has not seen any activity since it was marked stale. 25 | Closing. 26 | exempt-issue-labels: good-first-issue,need-help,no-stale,pinned,security 27 | exempt-pr-labels: "autorelease: pending,good-first-issue,need-help,no-stale,pinned,security" 28 | stale-issue-label: stale 29 | stale-issue-message: | 30 | This issue is stale because it has been open 60 days with no activity. 31 | Remove stale label or comment or this will be closed in 7 days 32 | stale-pr-label: stale 33 | stale-pr-message: | 34 | This PR is stale because it has been open 60 days with no activity. 35 | Remove stale label or comment or this will be closed in 7 days. 36 | # keep-sorted end 37 | -------------------------------------------------------------------------------- /.github/workflows/tests.yml: -------------------------------------------------------------------------------- 1 | name: tests 2 | 3 | on: 4 | pull_request: 5 | types: [opened, synchronize] 6 | paths: 7 | - tests/** 8 | - .github/workflows/tests.yml 9 | - entrypoint.sh 10 | - Dockerfile 11 | - .dockerignore 12 | push: 13 | branches: 14 | - main 15 | paths: 16 | - tests/** 17 | - .github/workflows/tests.yml 18 | - entrypoint.sh 19 | - Dockerfile 20 | - .dockerignore 21 | 22 | permissions: read-all 23 | 24 | jobs: 25 | tests: 26 | runs-on: ubuntu-latest 27 | steps: 28 | - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 29 | 30 | - name: Test 1 - Check done in tests/test2 - tests/test2/normal.md 31 | # Unpinned Actions Full Length Commit SHA 32 | # kics-scan ignore-line 33 | uses: ./ 34 | with: 35 | debug: true 36 | search_paths: tests/test2 37 | 38 | - name: Test 2 - Check with "exclude", "search_paths" and "quiet" - tests/test2/normal.md 39 | # kics-scan ignore-line 40 | uses: ./ 41 | with: 42 | exclude: | 43 | CHANGELOG.md 44 | test1/excluded_file.md 45 | bad.md 46 | tests/test3-multiple-files/ 47 | search_paths: tests/ 48 | quiet: true 49 | 50 | - name: Test 3 - Check "all" files 51 | continue-on-error: true 52 | # kics-scan ignore-line 53 | uses: ./ 54 | with: 55 | debug: true 56 | search_paths: tests 57 | 58 | - name: Create config file for markdown-link-check in "Test 4" 59 | run: | 60 | cat > .mlc_config.json << EOF 61 | { 62 | "ignorePatterns": [ 63 | { 64 | "pattern": "^https://non-existing-domain.com" 65 | } 66 | ] 67 | } 68 | EOF 69 | 70 | - name: Test 4 - Check with "search_paths", "verbose" and ".mlc_config.json" - "https://non-existing-domain.com" is ignored 71 | # kics-scan ignore-line 72 | uses: ./ 73 | with: 74 | search_paths: | 75 | tests/test1 76 | tests/test2 77 | verbose: true 78 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # keep-sorted start newline_separated=yes 2 | # Lychee cache 3 | .lycheecache 4 | 5 | # pre-commit configuration file 6 | .pre-commit-config.yaml 7 | # keep-sorted end 8 | -------------------------------------------------------------------------------- /.lycheeignore: -------------------------------------------------------------------------------- 1 | https://non-existing-domain.com/ 2 | -------------------------------------------------------------------------------- /.markdownlint.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Line length - https://github.com/DavidAnson/markdownlint/blob/master/doc/Rules.md#md013---line-length 3 | MD013: 4 | code_blocks: false 5 | tables: false 6 | -------------------------------------------------------------------------------- /.mega-linter.yml: -------------------------------------------------------------------------------- 1 | # Configuration file for MegaLinter 2 | # See all available variables at https://megalinter.io/latest/configuration/ and in linters documentation 3 | 4 | # keep-sorted start newline_separated=yes 5 | BASH_SHELLCHECK_ARGUMENTS: --exclude=SC2317 6 | 7 | BASH_SHFMT_ARGUMENTS: --case-indent --indent 2 --space-redirects 8 | 9 | DISABLE_LINTERS: 10 | - MARKDOWN_MARKDOWN_LINK_CHECK # Using lychee instead 11 | - SPELL_CSPELL 12 | - TERRAFORM_TERRASCAN # Hard to configure - no documentation of the config file 13 | 14 | # Remove: To receive reports as email, please set variable EMAIL_REPORTER_EMAIL 15 | EMAIL_REPORTER: false 16 | 17 | FAIL_IF_MISSING_LINTER_IN_FLAVOR: true 18 | 19 | FILTER_REGEX_EXCLUDE: CHANGELOG.md 20 | 21 | FORMATTERS_DISABLE_ERRORS: false 22 | 23 | JSON_JSONLINT_ARGUMENTS: --comments 24 | 25 | JSON_JSONLINT_FILTER_REGEX_EXCLUDE: .devcontainer/devcontainer.json 26 | 27 | MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.yml 28 | 29 | MARKDOWN_MARKDOWNLINT_FILTER_REGEX_EXCLUDE: CHANGELOG.md 30 | 31 | # Remove initial MegaLinter graphic 32 | PRINT_ALPACA: false 33 | 34 | # Disable creating report directory 35 | REPORT_OUTPUT_FOLDER: none 36 | 37 | REPOSITORY_CHECKOV_ARGUMENTS: --quiet 38 | 39 | # Do not leave debug code in production, Insecure URL 40 | REPOSITORY_DEVSKIM_ARGUMENTS: --ignore-globs CHANGELOG.md --ignore-rule-ids DS162092,DS137138 41 | 42 | REPOSITORY_KICS_ARGUMENTS: --fail-on high 43 | 44 | REPOSITORY_TRIVY_ARGUMENTS: --severity HIGH,CRITICAL --ignore-unfixed 45 | 46 | SPELL_LYCHEE_UNSECURED_ENV_VARIABLES: 47 | - GITHUB_TOKEN 48 | 49 | TERRAFORM_TFLINT_UNSECURED_ENV_VARIABLES: 50 | - GITHUB_TOKEN 51 | 52 | TYPESCRIPT_PRETTIER_ARGUMENTS: --html-whitespace-sensitivity=ignore 53 | 54 | VALIDATE_ALL_CODEBASE: true 55 | # keep-sorted end 56 | -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Changelog 2 | 3 | ## [1.4.0](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.3.0...v1.4.0) (2025-06-03) 4 | 5 | 6 | ### Features 7 | 8 | * add default github repo files ([#95](https://github.com/ruzickap/action-my-markdown-link-checker/issues/95)) ([f92ef75](https://github.com/ruzickap/action-my-markdown-link-checker/commit/f92ef757152a6d9b824f88a96413f13ce8ab422f)) 9 | * add GitHub default templates ([#86](https://github.com/ruzickap/action-my-markdown-link-checker/issues/86)) ([1c6b041](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1c6b041de33238096c9ac0e820cb0a690ad67d94)) 10 | * **gh:** add default github repo files ([#90](https://github.com/ruzickap/action-my-markdown-link-checker/issues/90)) ([273c630](https://github.com/ruzickap/action-my-markdown-link-checker/commit/273c6308e13adec3a7ac0c59e8e8865b80d335e0)) 11 | * **gh:** add default github repo files ([#93](https://github.com/ruzickap/action-my-markdown-link-checker/issues/93)) ([c40e631](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c40e631faca940a86ea099c550747853bc16216a)) 12 | 13 | ## [1.3.0](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.2.0...v1.3.0) (2024-05-26) 14 | 15 | 16 | ### Features 17 | 18 | * **gha:** Add GitHub repo files ([#77](https://github.com/ruzickap/action-my-markdown-link-checker/issues/77)) ([867808f](https://github.com/ruzickap/action-my-markdown-link-checker/commit/867808f16825d0a568c7bc38748d45879de07490)) 19 | * **gh:** add default GitHub repo files ([#78](https://github.com/ruzickap/action-my-markdown-link-checker/issues/78)) ([1fa2442](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1fa24426c105e4c45d670825e537c9657d8d718c)) 20 | * **gh:** add default GitHub repo files ([#80](https://github.com/ruzickap/action-my-markdown-link-checker/issues/80)) ([3a73948](https://github.com/ruzickap/action-my-markdown-link-checker/commit/3a73948959ba9f88ffb8eed15c00d937d7c7a1f4)) 21 | * **gh:** add default GitHub repo files ([#81](https://github.com/ruzickap/action-my-markdown-link-checker/issues/81)) ([c431d6a](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c431d6a0f19c943ae1a86c0fcd13f76f4b87e1ff)) 22 | * **gha:** make checkov config part of megalinter ([1bbd07a](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1bbd07a218dc560b107405f39956762f7b5d447e)) 23 | * **gha:** unify GHA - renovate, megalinter, markdown, ([c5332b0](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c5332b093e0b4a4877392d714db0e99c8fa4fb1a)) 24 | 25 | 26 | ### Bug Fixes 27 | 28 | * **gha:** add .lycheeignore to properly configure lychee ([0986c20](https://github.com/ruzickap/action-my-markdown-link-checker/commit/0986c203b51776c77b1e560106a715c2ba5e726c)) 29 | 30 | ## [1.2.0](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.1.2...v1.2.0) (2023-12-02) 31 | 32 | 33 | ### Features 34 | 35 | * **gha:** add release-please, format renovate.json5, del update-semver ([3ed2c62](https://github.com/ruzickap/action-my-markdown-link-checker/commit/3ed2c623408f36eb0f51dd6c780850b117b88329)) 36 | 37 | ## [v1.1.2](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.1.1...v1.1.2) 38 | 39 | - feat(gh_actions): fix update-semver permissions [`0d99c8d`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/0d99c8d0a0db064ee451d405e8b7acc9f0383d4a) 40 | 41 | ## [v1.1.1](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.1.0...v1.1.1) (2023-10-25) 42 | 43 | - chore(deps): update megalinter/megalinter action to v7.4.0 [`#62`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/62) 44 | - refactor(renovate): remove branchPrefix from renovate.json5 [`#61`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/61) 45 | - chore(deps): update megalinter/megalinter action to v7.2.1 [`#59`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/59) 46 | - chore(deps): update megalinter/megalinter action to v7 [`#58`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/58) 47 | - docs(changelog): CHANGELOG file update [skip ci] [`f5429f5`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/f5429f502189f77e506e5f259458561c16dc61b2) 48 | - chore(deps): update tibdex/github-app-token action to v2 [`7093a52`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/7093a52c1915d5a00f364736f210e49cefab2f0c) 49 | - chore(deps): update actions/checkout action to v4 [`b13dcc5`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/b13dcc5a2a93b4a00910075e864c848b7090fbad) 50 | - chore(deps): update megalinter/megalinter action to v7.3.0 [`929cd45`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/929cd451ddf676ff1f5d22918d08cd5c17df172f) 51 | - chore(deps): update renovatebot/github-action action to v39 [`766a90b`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/766a90b106eb8f5ae80b2266ebb7b3f4927bfba6) 52 | - chore(deps): update megalinter/megalinter action to v7.1.0 [`4b1330c`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/4b1330cc050dbe0d95a2a4ae19afa242be838cfa) 53 | - chore(deps): update megalinter/megalinter action to v7.0.4 [`791ed69`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/791ed6981d5c05c62bac06cfa4d75baffcde1275) 54 | - chore(deps): update renovatebot/github-action action to v38 [`978a0be`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/978a0beb68d476c43964f7577d914de2f87c83ce) 55 | - chore(deps): update renovatebot/github-action action to v37 [`f47ab3d`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/f47ab3d87d0ea9d224d72c5ddd31e697856d0109) 56 | - chore(deps): update renovatebot/github-action action to v36.1.1 [`ba75dc7`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/ba75dc7765a8f9a9b88f263d1c7f35a9c0392f01) 57 | - chore(deps): update dependency markdown-link-check to v3.11.2 [`a26ae20`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/a26ae20677da4a266d606a4329a85c1a0ab6c856) 58 | - chore(deps): update dependency markdown-link-check to v3.11.1 [`6ccfda2`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/6ccfda2284c850ad01d7853e55e3a77a2c920a8e) 59 | - chore(deps): update megalinter/megalinter action to v6.22.2 [`17fcb73`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/17fcb732df74d0a6c1835b8b30a7999ac2e86bc0) 60 | - chore(deps): update megalinter/megalinter action to v6.22.0 [`b111921`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/b111921e517b172777aa82419e91f95fc975aedd) 61 | - chore(deps): update actions/stale action to v8 [`227e84f`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/227e84f0599ac500bd52cbed248ec03a6750806e) 62 | - chore(deps): update dependency markdown-link-check to v3.11.0 [`8bad2bf`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/8bad2bf5fe0dc3fb7e78a1817147a0b75fce5679) 63 | - chore(deps): update renovatebot/github-action action to v36 [`fde0d60`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/fde0d60c0eca5502c4819621954469249691df92) 64 | - fix(gha): add top level readonly permissions to all gha [`a6eac94`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/a6eac9446b10545f0613606fd384506b51395473) 65 | - chore(deps): update megalinter/megalinter action to v6.20.1 [`acfce74`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/acfce7401c74226d42b2ff84fbb517e609e54d10) 66 | - chore(deps): update renovatebot/github-action action to v35 [`5a3a85d`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/5a3a85d6e6ce3878955987d89fb74aa9db7c498f) 67 | - chore(deps): update megalinter/megalinter action to v6.19.0 [`448fda9`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/448fda9d02f21574d7a08f23d1916c5daf1e7618) 68 | - feat(gh_actions): replace stale + add commitlint [`d1448cd`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/d1448cd765df95ebf02dc20be57f832bf226db4a) 69 | - chore(deps): update megalinter/megalinter action to v6.18.0 [`be5a155`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/be5a1550e5978456ee12cc9b4e2e25ff7a13a98d) 70 | - fix(renovate): schedule typo [`1755fa7`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1755fa7b5b1e28ef6e66d432ecda1b3733c3c91f) 71 | - feat(gh-actions): add lint-pr-title [`ab7d541`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/ab7d5411f17449e425b1a68d6130677cbd14baf5) 72 | 73 | ## [v1.1.0](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.7...v1.1.0) (2023-01-06) 74 | 75 | - docs(changelog): CHANGELOG file update [skip ci] [`a2d2f78`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/a2d2f781cc8e4ed24f9a53b3e048de3c212bc344) 76 | - feat(gh-actions): add mega-linter and remove old gh actions [`c869df3`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c869df3e86a7892209fe23902d818ce4820b3b1d) 77 | - feat(markdown-link-check): use one execution for all files [`1de2d96`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1de2d96f61bb2358b8ef8262672b884285359e61) 78 | - chore(deps): update renovatebot/github-action action to v34.77.0 [`4d25c1f`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/4d25c1f86303c363278fddf98bd97b5980ff4a5c) 79 | - docs(readme): remove old links [`a969a97`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/a969a978cf89b762c0dcb81155ffbaf086df2717) 80 | - remove name duplicate [`717a5f0`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/717a5f0dd8271a034c9b33d4a75072da463c572a) 81 | - Update renovatebot/github-action action to v34.73.0 [`c714d34`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c714d3488ce70f1c441918d472b4cf15c9d40903) 82 | - Update renovatebot/github-action action to v34.62.1 [`b2d68ea`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/b2d68ea6a5db927b6564aeeea84cf9bbd175d2d4) 83 | - Update renovatebot/github-action action to v34.54.1 [`e09a389`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/e09a38998d7fc861f9222220725d999104ca3763) 84 | - Update renovatebot/github-action action to v34.48.0 [`bb420c0`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/bb420c06ec04ba076b2cff8e26b4f5e16e182dcc) 85 | - Update renovatebot/github-action action to v34.39.0 [`94e5e3e`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/94e5e3e8a26f78ca93543beb26caa5b9ddc518b3) 86 | - Update renovatebot/github-action action to v34.28.0 [`f0c9869`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/f0c98699af0c64116679897a0c4248945524f74e) 87 | - Update renovatebot/github-action action to v34.23.1 [`21cd3eb`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/21cd3eb8c2ac4f8de036c1a1bf3b8d17fed9d47d) 88 | - Update renovatebot/github-action action to v34.19.0 [`06c68c1`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/06c68c19f72b55a2bcfe83846cab16a09a7d3608) 89 | - Update renovatebot/github-action action to v34 [`cd22f20`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/cd22f202abe66e55782eb0d088353a5dae81578f) 90 | - Update renovatebot/github-action action to v32.241.10 [`4919df1`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/4919df1c1b90abd4f8b53a9ca9b88ad87418c712) 91 | - Update renovatebot/github-action action to v32.238.3 [`e8fc4a0`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/e8fc4a0df84076d187a422b0a14f45e43369347c) 92 | - Update renovatebot/github-action action to v32.225.1 [`71f5e35`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/71f5e35ae5dfadecd78f8a7348d8b63e5e736c98) 93 | - Update renovatebot/github-action action to v32.211.1 [`043af66`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/043af660bf040051721570e0323ca1a0068b8bf5) 94 | - Update dependency markdown-link-check to v3.10.3 [`d625ac3`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/d625ac3ed67ee75710f19a4f68b0f5a7678f4d45) 95 | - Update renovatebot/github-action action to v32.202.4 [`fc4fc3e`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/fc4fc3ec9c8b7f6c92298ae2649eb083a21db951) 96 | - Update renovatebot/github-action action to v32.197.1 [`616ffe8`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/616ffe860c588bbcacc4d0ef9f062070911be81a) 97 | - Update renovatebot/github-action action to v32.194.4 [`d841d01`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/d841d012189506e797a4c6f18965f8837fd4204f) 98 | - Update renovatebot/github-action action to v32.190.0 [`4bae075`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/4bae0758879d9082ba455e3730fa8df3466a5875) 99 | - Update renovatebot/github-action action to v32.179.1 [`ad3a5d4`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/ad3a5d40838f707bd0ea3979313abc729935736c) 100 | - Update renovatebot/github-action action to v32.168.0 [`08f4430`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/08f44306e54edf5ecc39fe502eec14a4b69138a3) 101 | 102 | ## [v1.0.7](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.6...v1.0.7) (2022-08-14) 103 | 104 | - Fix linter "tags" issue [`92dd5b0`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/92dd5b0866629c9abaa50f8231805dfb97e572f2) 105 | - Update renovatebot/github-action action to v32.159.0 [`d4ea81a`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/d4ea81ab74d75cc4e7c766a3e51d13cdc53fd043) 106 | - Update renovatebot/github-action action to v32.150.4 [`55dd266`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/55dd26633f4d41586a1e78824ccfddece1da6b2d) 107 | - Update renovatebot/github-action action to v32.135.1 [`8fc6574`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/8fc65749e12e79a05946f395b66d86a421f626fe) 108 | - Update renovatebot/github-action action to v32.125.0 [`14d1940`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/14d1940e22fcac7ce09f3ba11745ca3183868c7b) 109 | - Update renovatebot/github-action action to v32.117.3 [`c94df47`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c94df479fbbcbc053ea9c52a38c98f07375977db) 110 | - Update renovatebot/github-action action to v32.108.0 [`77e3cbd`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/77e3cbd8e50dd4ada6ada96300655b62196115bb) 111 | - Improve renovate [`e89785d`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/e89785df3ef58601f7013139178f054af1c7ea74) 112 | - Update renovatebot/github-action action to v32.107.0 [`116a0ae`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/116a0ae224dfdf781ea8ee5b10e0ba3bed8516da) 113 | - Update renovatebot/github-action action to v32.106.0 [`8ae4ec1`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/8ae4ec16c731896bdc5b8a644102980b0def8d1a) 114 | - Update renovatebot/github-action action to v32.105.0 [`3853a74`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/3853a741675e3dd8af04aabe27a722ebf46e822b) 115 | - Update renovatebot/github-action action to v32.103.0 [`1908487`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1908487c21447ba186ca57965791b007772b8bbf) 116 | - Update renovatebot/github-action action to v32.102.2 [`ee43b50`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/ee43b506c60137bec6f7d0e24db37890b57b853e) 117 | - Update renovatebot/github-action action to v32.100.0 [`1ee6b46`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1ee6b46edb7a003b14f85c16c48637be8854a8e9) 118 | - Fix typo "non" -> "none" [`93477bf`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/93477bff24b10b66e2c26dc74d3027eddd4935fc) 119 | - Update renovatebot/github-action action to v32.99.1 [`c8ee38a`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/c8ee38aae0e9f64fe322f767065bfccfdb4530d4) 120 | - Update renovatebot/github-action action to v32.97.0 [`03985af`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/03985affdec698f11dc8b5d48023b4aaed5972ef) 121 | - Update renovatebot/github-action action to v32.96.0 [`dc58ff3`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/dc58ff350faedfebe082ffcf645393f2628eccf0) 122 | - Update renovatebot/github-action action to v32.94.0 [`bd331d9`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/bd331d995ff4fafe9bd4df38359f98ea672659f5) 123 | - Update renovatebot/github-action action to v32.92.0 [`9152368`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/91523686cb5ad831362944d1f0af430e7db42094) 124 | - Update renovatebot/github-action action to v32.91.1 [`1ae0356`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1ae0356d75058bbff450ca12764d1e9ad7949619) 125 | - Update renovatebot/github-action action to v32.90.0 [`181d74a`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/181d74a594bf932b9ec417236b4b598a39cdd069) 126 | - Update renovatebot/github-action action to v32.89.0 [`0cb2267`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/0cb2267a5ae7088b1e499d61340316b916ad26c4) 127 | - Update renovatebot/github-action action to v32.88.0 [`21eda42`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/21eda427f9a4f0405ae20141da8d76290c32dbeb) 128 | - Update renovatebot/github-action action to v32.87.0 [`964a102`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/964a102f329b790eb4799ead1d5c097749dd7309) 129 | - Update renovatebot/github-action action to v32.86.0 [`1a81a2c`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/1a81a2cc5ba4e3e25526b1a0a059200e690c1b3d) 130 | - Update renovatebot/github-action action to v32.85.0 [`b3b1b3c`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/b3b1b3c31b58c6918633a973a63b51853ead9098) 131 | - Update renovatebot/github-action action to v32.83.0 [`ab4d8c2`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/ab4d8c2242fab358dca82ddc5c6d1efc9199daee) 132 | - Update renovatebot/github-action action to v32.82.0 [`7b06863`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/7b0686359a9e2f6fbed0a73b673cbc18a2f5a39d) 133 | - Update renovatebot/github-action action to v32.80.1 [`9d4265e`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/9d4265edf59210e60110d37fe75ea0f11dcce930) 134 | - Update renovatebot/github-action action to v32.78.1 [`10eb4e7`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/10eb4e7d21b6fd9762e90da8ea5f56c64caf37e3) 135 | - Update renovatebot/github-action action to v32.76.1 [`f93e00b`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/f93e00ba603cfe56d34be72d29d3cf7b7556bfb7) 136 | - Update renovatebot/github-action action to v32.74.2 [`8029e71`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/8029e713986158ebce8b20c8930c4f7fc3935990) 137 | - Update renovatebot/github-action action to v32.73.0 [`b39efcd`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/b39efcd5630103c9ce7a0a1b46be6a20f93c7d10) 138 | - Update renovatebot/github-action action to v32.71.0 [`ef8e7d7`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/ef8e7d72b83af085e1f956bcea24f2cadbec1b17) 139 | - Update renovatebot/github-action action to v32.70.0 [`30841b5`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/30841b5b7dadaf6238f3899dee42658dd2ff6841) 140 | - Improve renovate [`99c9bbe`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/99c9bbe9e1a99132a384caa0170d1a8045cb6905) 141 | - Update renovatebot/github-action action to v32.68.3 [`27a67b0`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/27a67b0e6141f131f8d222d16bafa974b6d2c3f7) 142 | - Update renovatebot/github-action action to v32.68.2 [`cbb464f`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/cbb464fada726d58899e9fe72fcfc0eabb0113c3) 143 | - Update renovatebot/github-action action to v32.68.1 [`82b8fd5`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/82b8fd5e61196f9b298ea30ebb37e02e25732c76) 144 | - Update renovatebot/github-action action to v32.68.0 [`7662406`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/76624063d8e53afa74660dd2c73c52e940e4840a) 145 | - Add renovate npm [`7168d6c`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/7168d6c11db4362fc67f121ae482f84f6280f36f) 146 | - Update renovatebot/github-action action to v32.66.7 [`8a5688b`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/8a5688bdc294df6610d22d4f99a98bd38edeb444) 147 | 148 | ## [v1.0.6](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.5...v1.0.6) (2022-05-05) 149 | 150 | - Fix markdown-link-check [`2112e8b`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/2112e8b06f07b5f338ee62637b08b52119c1568d) 151 | 152 | ## [v1.0.5](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.4...v1.0.5) (2022-05-05) 153 | 154 | - Update markdown-link-check [`#25`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/25) 155 | - Update markdown-link-check [`#22`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/22) 156 | 157 | ## [v1.0.4](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.3...v1.0.4) (2021-12-24) 158 | 159 | - Move from master to main [`#20`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/20) 160 | - Update markdownlint [`#19`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/19) 161 | - Use super-linter:slim [`#18`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/18) 162 | - Upgrade GH Actions versions [`#17`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/17) 163 | 164 | ## [v1.0.3](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.2...v1.0.3) (2021-04-02) 165 | 166 | - Update markdown-link-check [`#15`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/15) 167 | - Upgrade markdown-link-check to 3.8.6 [`#14`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/14) 168 | 169 | ## [v1.0.2](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.1...v1.0.2) (2020-09-17) 170 | 171 | - Fix super-linter configuration [`#12`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/12) 172 | - Update README and set markdown-link-check version in Dockerfile [`#11`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/11) 173 | - Add examples to README [`#10`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/10) 174 | 175 | ## [v1.0.1](https://github.com/ruzickap/action-my-markdown-link-checker/compare/v1.0.0...v1.0.1) (2020-07-21) 176 | 177 | - Add demo to README + demo script [`#8`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/8) 178 | - Add .mlc_config.json test [`#7`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/7) 179 | - Add .mlc_config.json as default config for markdown-link-check [`#6`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/6) 180 | - Add markdown GH Action checking md files [`#5`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/5) 181 | 182 | ## v1.0.0 (2020-07-20) 183 | 184 | - Update README [`#3`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/3) 185 | - Add README + test [`#2`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/2) 186 | - Initial code [`#1`](https://github.com/ruzickap/action-my-markdown-link-checker/pull/1) 187 | - Initial commit [`d63a3b2`](https://github.com/ruzickap/action-my-markdown-link-checker/commit/d63a3b2f0aed1822385f8f68c0468aff30c05674) 188 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:current-alpine@sha256:7aaba6b13a55a1d78411a1162c1994428ed039c6bbef7b1d9859c25ada1d7cc5 2 | 3 | LABEL maintainer="Petr Ruzicka " 4 | LABEL repository="https://github.com/ruzickap/action-my-markdown-link-checker" 5 | LABEL homepage="https://github.com/ruzickap/action-my-markdown-link-checker" 6 | 7 | LABEL "com.github.actions.name"="My Markdown Link Checker" 8 | LABEL "com.github.actions.description"="Check markdown files for broken links" 9 | LABEL "com.github.actions.icon"="list" 10 | LABEL "com.github.actions.color"="blue" 11 | 12 | # renovate: datasource=npm depName=markdown-link-check versioning=npm 13 | ENV MARKDOWNLINT_LINK_CHECK_VERSION="3.13.7" 14 | 15 | SHELL ["/bin/ash", "-eo", "pipefail", "-c"] 16 | 17 | # kics-scan ignore-block 18 | RUN set -eux && \ 19 | apk --update --no-cache add bash fd && \ 20 | npm install --global --production "markdown-link-check@v${MARKDOWNLINT_LINK_CHECK_VERSION}" 21 | 22 | COPY entrypoint.sh /entrypoint.sh 23 | 24 | USER nobody 25 | 26 | WORKDIR /mnt 27 | 28 | HEALTHCHECK NONE 29 | 30 | ENTRYPOINT [ "/entrypoint.sh" ] 31 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # GitHub Action: My Markdown Link Checker 2 | 3 | [![GitHub Marketplace](https://img.shields.io/badge/Marketplace-My%20Markdown%20Link%20Checker-blue.svg?colorA=24292e&colorB=0366d6&style=flat&longCache=true&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAAM6wAADOsB5dZE0gAAABl0RVh0U29mdHdhcmUAd3d3Lmlua3NjYXBlLm9yZ5vuPBoAAAERSURBVCiRhZG/SsMxFEZPfsVJ61jbxaF0cRQRcRJ9hlYn30IHN/+9iquDCOIsblIrOjqKgy5aKoJQj4O3EEtbPwhJbr6Te28CmdSKeqzeqr0YbfVIrTBKakvtOl5dtTkK+v4HfA9PEyBFCY9AGVgCBLaBp1jPAyfAJ/AAdIEG0dNAiyP7+K1qIfMdonZic6+WJoBJvQlvuwDqcXadUuqPA1NKAlexbRTAIMvMOCjTbMwl1LtI/6KWJ5Q6rT6Ht1MA58AX8Apcqqt5r2qhrgAXQC3CZ6i1+KMd9TRu3MvA3aH/fFPnBodb6oe6HM8+lYHrGdRXW8M9bMZtPXUji69lmf5Cmamq7quNLFZXD9Rq7v0Bpc1o/tp0fisAAAAASUVORK5CYII=)](https://github.com/marketplace/actions/my-markdown-link-checker) 4 | [![license](https://img.shields.io/github/license/ruzickap/action-my-markdown-link-checker.svg)](https://github.com/ruzickap/action-my-markdown-link-checker/blob/main/LICENSE) 5 | [![release](https://img.shields.io/github/release/ruzickap/action-my-markdown-link-checker.svg)](https://github.com/ruzickap/action-my-markdown-link-checker/releases/latest) 6 | [![GitHub release date](https://img.shields.io/github/release-date/ruzickap/action-my-markdown-link-checker.svg)](https://github.com/ruzickap/action-my-markdown-link-checker/releases) 7 | ![GitHub Actions status](https://github.com/ruzickap/action-my-markdown-link-checker/workflows/docker-image/badge.svg) 8 | [![Docker Hub Build Status](https://img.shields.io/docker/cloud/build/peru/my-markdown-link-checker.svg)](https://hub.docker.com/r/peru/my-markdown-link-checker) 9 | 10 | This is a GitHub Action to check Markdown files for broken links. 11 | This Action uses the [markdown-link-check](https://github.com/tcort/markdown-link-check) 12 | library and [fd](https://github.com/sharkdp/fd) command-line utility. 13 | 14 | Below is a basic example of how to use this GitHub Action: 15 | 16 | ```yaml 17 | name: markdown-link-check 18 | 19 | on: 20 | push: 21 | 22 | jobs: 23 | markdown-link-check: 24 | name: Check markdown files 25 | runs-on: ubuntu-latest 26 | steps: 27 | - uses: actions/checkout@v4 28 | 29 | - name: Markdown links check 30 | uses: ruzickap/action-my-markdown-link-checker@v1 31 | ``` 32 | 33 | ## Parameters 34 | 35 | Variables used by `action-my-markdown-link-checker` GitHub Action: 36 | 37 | | Variable | Default | Description | 38 | |-----------------|-----------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------| 39 | | `config_file` | `.mlc_config.json` (if exists) | [Config file](https://github.com/tcort/markdown-link-check#config-file-format) used by [markdown-link-check](https://github.com/tcort/markdown-link-check) | 40 | | `debug` | (not defined) | Enable debug mode for the [entrypoint.sh](entrypoint.sh) script (`set -x`) and `--verbose` for [markdown-link-check](https://github.com/tcort/markdown-link-check) | 41 | | `exclude` | (not defined) | Exclude files or directories - see the [--exclude parameter](https://github.com/sharkdp/fd#excluding-specific-files-or-directories) of [fd](https://github.com/sharkdp/fd) | 42 | | `fd_cmd_params` | `. -0 --extension md --type f --hidden --no-ignore` | Set your own parameters for [fd](https://github.com/sharkdp/fd) command. `exclude` and `search_paths` parameters are ignored if this is set. | 43 | | `quiet` | (not defined) | Display errors only | 44 | | `search_paths` | (not defined) | By default, all `*.md` files in the entire repository are checked. This parameter allows you to specify particular directories to search. | 45 | | `verbose` | (not defined) | Displays detailed error information | 46 | 47 | None of the parameters listed above are mandatory. 48 | 49 | If you need to exclude/ignore domains, add custom headers, or prevent specific 50 | URLs from being checked, use the `config_file` option for [markdown-link-check](https://github.com/tcort/markdown-link-check). 51 | See the [config file format documentation](https://github.com/tcort/markdown-link-check#config-file-format) 52 | for details. 53 | 54 | If a `.mlc_config.json` file is present in the root of your repository, it will 55 | be automatically used as the `config_file`. 56 | 57 | ## Full GitHub Action Workflow Example 58 | 59 | Full GitHub Action Workflow Example: 60 | 61 | ```yaml 62 | name: markdown-link-check 63 | 64 | on: 65 | push: 66 | branches: 67 | - main 68 | 69 | jobs: 70 | markdown-link-check: 71 | name: Check markdown files for broken links 72 | runs-on: ubuntu-latest 73 | steps: 74 | - uses: actions/checkout@v4 75 | 76 | - name: Markdown links check 77 | uses: ruzickap/action-my-markdown-link-checker@v1 78 | with: 79 | config_file: mlc_config.json 80 | debug: true 81 | exclude: | 82 | my_exclude_dir/md_files/ 83 | my_exclude_dir_2/markdown_files/ 84 | CHANGELOG.md 85 | search_paths: | 86 | check_dir_1/md_files/ 87 | check_dir_2/markdown_files/ 88 | 89 | - name: Markdown links check - check only 'docs' directory and exclude CHANGELOG.md 90 | uses: ruzickap/action-my-markdown-link-checker@v1 91 | with: 92 | search_paths: | 93 | docs/ 94 | exclude: | 95 | CHANGELOG.md 96 | verbose: true 97 | 98 | - name: Markdown links check - simple example 99 | uses: ruzickap/action-my-markdown-link-checker@v1 100 | 101 | - name: Markdown links check using pre-built container 102 | uses: docker://peru/my-markdown-link-checker@v1 103 | ``` 104 | 105 | Example of Periodic Execution (Cron Job): 106 | 107 | ```yaml 108 | name: periodic-markdown-link-check 109 | 110 | on: 111 | schedule: 112 | - cron: '8 8 * * 2' 113 | 114 | jobs: 115 | markdown-link-check: 116 | runs-on: ubuntu-latest 117 | steps: 118 | - uses: actions/checkout@v4 119 | 120 | - name: Markdown links check 121 | uses: ruzickap/action-my-markdown-link-checker@v1 122 | ``` 123 | 124 | ## Running locally 125 | 126 | You can also run the Markdown link checker locally using Docker: 127 | 128 | ```bash 129 | docker run --rm -t -v "${PWD}/tests/test2:/mnt" peru/my-markdown-link-checker 130 | ``` 131 | 132 | Output: 133 | 134 | ```text 135 | *** Start checking... 136 | *** Running: fd . -0 --extension md --type f --hidden --no-ignore 137 | *** Running: markdown-link-check normal.md 138 | 139 | FILE: normal.md 140 | [✓] https://google.com 141 | 142 | 1 links checked. 143 | 144 | 145 | *** Checks completed... 146 | ``` 147 | 148 | Alternatively, you can use parameters with the Docker command: 149 | 150 | ```bash 151 | export INPUT_EXCLUDE="CHANGELOG.md test1/excluded_file.md bad.md excluded_dir/" 152 | export INPUT_SEARCH_PATHS="tests/" 153 | export INPUT_VERBOSE="true" 154 | docker run --rm -t -e INPUT_EXCLUDE -e INPUT_SEARCH_PATHS -e INPUT_VERBOSE -v "${PWD}:/mnt" peru/my-markdown-link-checker 155 | ``` 156 | 157 | Output: 158 | 159 | ```text 160 | *** Start checking... 161 | *** Running: fd . -0 --extension md --type f --hidden --no-ignore --exclude CHANGELOG.md --exclude test1/excluded_file.md --exclude bad.md --exclude excluded_dir/ tests/ 162 | *** Running: markdown-link-check --verbose tests/test2/normal.md 163 | 164 | FILE: tests/test2/normal.md 165 | [✓] https://google.com → Status: 200 166 | 167 | 1 links checked. 168 | 169 | 170 | *** Checks completed... 171 | ``` 172 | 173 | Example output for broken links: 174 | 175 | ```shell 176 | docker run --rm -t -e INPUT_SEARCH_PATHS -e INPUT_VERBOSE -v "${PWD}:/mnt" peru/my-markdown-link-checker 177 | ``` 178 | 179 | Output: 180 | 181 | ```text 182 | *** Start checking... 183 | *** Running: fd . -0 --extension md --type f --hidden --no-ignore tests/ 184 | *** Running: markdown-link-check --verbose tests/excluded_dir/excluded.md 185 | 186 | FILE: tests/excluded_dir/excluded.md 187 | [✓] https://google.com → Status: 200 188 | 189 | 1 links checked. 190 | 191 | 192 | *** Running: markdown-link-check --verbose tests/test-bad-mdfile/bad.md 193 | 194 | FILE: tests/test-bad-mdfile/bad.md 195 | [✖] https://non-existing-domain.com → Status: 0 Error: getaddrinfo ENOTFOUND non-existing-domain.com 196 | at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:66:26) { 197 | errno: -3008, 198 | code: 'ENOTFOUND', 199 | syscall: 'getaddrinfo', 200 | hostname: 'non-existing-domain.com' 201 | } 202 | 203 | 1 links checked. 204 | 205 | ERROR: 1 dead links found! 206 | [✖] https://non-existing-domain.com → Status: 0 207 | *** ERROR: Something went wrong - see the errors above... 208 | ``` 209 | 210 | Demo: 211 | 212 | [![My Markdown Link Checker](https://asciinema.org/a/348733.svg)](https://asciinema.org/a/348733) 213 | 214 | ## Similar projects 215 | 216 | * [https://github.com/gaurav-nelson/github-action-markdown-link-check](https://github.com/gaurav-nelson/github-action-markdown-link-check) 217 | * Great project, but it lacked functionality to exclude or skip files when 218 | last checked (2020-07-20). 219 | * [https://github.com/ocular-d/md-linkcheck-action](https://github.com/ocular-d/md-linkcheck-action) 220 | * Similar project, but it does not offer as many advanced features. 221 | * [https://github.com/peter-evans/link-checker](https://github.com/peter-evans/link-checker) 222 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Reporting a Vulnerability 4 | 5 | To report a security issue, please email [petr.ruzicka@gmail.com](mailto:petr.ruzicka@gmail.com) 6 | with a description of the issue, the steps you took to create the issue, 7 | affected versions, and, if known, mitigations for the issue. This project 8 | follows a 90 day disclosure timeline. 9 | -------------------------------------------------------------------------------- /action.yml: -------------------------------------------------------------------------------- 1 | name: "My Markdown Link Checker" 2 | description: "Check markdown files for broken links" 3 | author: "ruzickap" 4 | runs: 5 | using: "docker" 6 | image: "Dockerfile" 7 | branding: 8 | icon: "list" 9 | color: "blue" 10 | inputs: 11 | config_file: 12 | description: "markdown-link-check config file" 13 | debug: 14 | description: "Debug mode" 15 | exclude: 16 | description: "Exclude files or directories" 17 | fd_cmd_params: 18 | description: 'Command-line parameters for the fd command. The "exclude" and "search_paths" parameters are ignored if this is set.' 19 | quiet: 20 | description: "Quiet mode for markdown-link-check" 21 | search_paths: 22 | description: 'Set paths that should be recursively scanned for Markdown files (*.md) and linted. By default, all "*.md" files are checked.' 23 | verbose: 24 | description: "Verbose mode for markdown-link-check" 25 | -------------------------------------------------------------------------------- /demo/my-markdown-link-checker-demo.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | # shellcheck disable=SC2016 3 | 4 | # Record using: termtosvg --screen-geometry 93x30 --command ./my-markdown-link-checker-demo.sh 5 | 6 | set -u 7 | 8 | ################################################ 9 | # include the magic 10 | ################################################ 11 | test -s ./demo-magic.sh || curl --silent https://raw.githubusercontent.com/paxtonhare/demo-magic/master/demo-magic.sh > demo-magic.sh 12 | # shellcheck disable=SC1091 13 | . ./demo-magic.sh 14 | 15 | ################################################ 16 | # Configure the options 17 | ################################################ 18 | 19 | # 20 | # speed at which to simulate typing. bigger num = faster 21 | # 22 | export TYPE_SPEED=20 23 | 24 | # Uncomment to run non-interactively 25 | export PROMPT_TIMEOUT=1 26 | 27 | # No wait 28 | export NO_WAIT=false 29 | 30 | # 31 | # custom prompt 32 | # 33 | # see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html for escape sequences 34 | # 35 | #DEMO_PROMPT="${GREEN}➜ ${CYAN}\W " 36 | export DEMO_PROMPT="${GREEN}➜ ${CYAN}$ " 37 | 38 | # hide the evidence 39 | clear 40 | 41 | p '* This is an example of my-markdown-link-checker usage...' 42 | 43 | p '' 44 | p '* Run the container image "peru/my-markdown-link-checker" to start checking "md" files in the "tests" directory:' 45 | pe 'export INPUT_SEARCH_PATHS="tests/"' 46 | pe 'docker run --rm -t -e INPUT_SEARCH_PATHS -v "${PWD}:/mnt" peru/my-markdown-link-checker' 47 | 48 | sleep 3 49 | 50 | p '' 51 | p '* As you can see, there is a dead link (https://non-existing-domain.com) in the file tests/test-bad-mdfile/bad.md' 52 | 53 | p '' 54 | p "* You can create a config file for markdown-link-check and ignore this domain from checks:" 55 | pe 'cat > .mlc_config.json << EOF 56 | { 57 | "ignorePatterns": [ 58 | { 59 | "pattern": "^https://non-existing-domain.com" 60 | } 61 | ] 62 | } 63 | EOF 64 | ' 65 | pe 'docker run --rm -t -e INPUT_SEARCH_PATHS -v "${PWD}:/mnt" peru/my-markdown-link-checker' 66 | pe 'rm .mlc_config.json' 67 | 68 | sleep 3 69 | 70 | p '' 71 | p "* Or you can exclude this file from being checked:" 72 | pe 'export INPUT_EXCLUDE="test-bad-mdfile/bad.md test1/CHANGELOG.md"' 73 | pe 'docker run --rm -t -e INPUT_EXCLUDE -e INPUT_SEARCH_PATHS -v "${PWD}:/mnt" peru/my-markdown-link-checker' 74 | 75 | sleep 3 76 | 77 | p '' 78 | p "* Use verbose mode if you want more details:" 79 | pe 'export INPUT_VERBOSE="true"' 80 | pe 'docker run --rm -t -e INPUT_EXCLUDE -e INPUT_VERBOSE -e INPUT_SEARCH_PATHS -v "${PWD}:/mnt" peru/my-markdown-link-checker' 81 | 82 | sleep 3 83 | 84 | p '' 85 | p '* You can also specify the command-line parameters for the fd command if you need advanced search:' 86 | pe 'export INPUT_FD_CMD_PARAMS=". -0 --extension md --type f --hidden --no-ignore --exclude test1/excluded_file.md --exclude bad.md --exclude CHANGELOG.md tests/"' 87 | pe 'docker run --rm -t -e INPUT_FD_CMD_PARAMS -v "${PWD}:/mnt" peru/my-markdown-link-checker' 88 | 89 | sleep 3 90 | 91 | p '' 92 | p '* If you are in trouble you can try the debug mode:' 93 | pe 'export INPUT_SEARCH_PATHS="tests/"' 94 | pe 'export INPUT_DEBUG="true"' 95 | pe 'docker run --rm -t -e INPUT_DEBUG -e INPUT_SEARCH_PATHS -v "${PWD}:/mnt" peru/my-markdown-link-checker' 96 | 97 | sleep 3 98 | 99 | p '' 100 | p '* If you run the docker command without additional environment parameters - it will check all "md" files in current directory. That is the simplest way:' 101 | pe 'docker run --rm -t -v "${PWD}:/mnt" peru/my-markdown-link-checker' 102 | 103 | sleep 3 104 | 105 | p '' 106 | p '* Enjoy ;-) ...' 107 | 108 | sleep 3 109 | 110 | rm ./demo-magic.sh 111 | -------------------------------------------------------------------------------- /entrypoint.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -Eeuo pipefail 4 | 5 | # Config file for markdown-link-check 6 | export CONFIG_FILE=${INPUT_CONFIG_FILE:-} 7 | 8 | # Debug variable - enable by setting non-empty value 9 | export DEBUG=${INPUT_DEBUG:-} 10 | 11 | # Exclude files or directories that should not be checked 12 | export EXCLUDE=${INPUT_EXCLUDE:-} 13 | 14 | # Command-line parameters for fd (the "exclude" and "search_paths" parameters are ignored if this is set) 15 | export FD_CMD_PARAMS="${INPUT_FD_CMD_PARAMS:- . -0 --extension md --type f --hidden --no-ignore}" 16 | 17 | # Debug variable - enable by setting non-empty value 18 | export QUIET=${INPUT_QUIET:-} 19 | 20 | # Files or paths that will be checked 21 | export SEARCH_PATHS=${INPUT_SEARCH_PATHS:-} 22 | 23 | # Debug variable - enable by setting non-empty value 24 | export VERBOSE=${INPUT_VERBOSE:-} 25 | 26 | print_error() { 27 | echo -e "\e[31m*** ERROR: ${1}\e[m" 28 | } 29 | 30 | print_info() { 31 | echo -e "\e[36m*** ${1}\e[m" 32 | } 33 | 34 | error_trap() { 35 | print_error "Something went wrong - see the errors above..." 36 | exit 1 37 | } 38 | 39 | ################ 40 | # Main 41 | ################ 42 | 43 | trap error_trap ERR 44 | 45 | [ -n "${DEBUG}" ] && set -x 46 | 47 | declare -a MARKDOWN_LINK_CHECK_CMD_PARAMS 48 | 49 | if [ -n "${CONFIG_FILE}" ]; then 50 | MARKDOWN_LINK_CHECK_CMD_PARAMS+=("--config" "${CONFIG_FILE}") 51 | elif [ -s .mlc_config.json ]; then 52 | MARKDOWN_LINK_CHECK_CMD_PARAMS+=("--config" ".mlc_config.json") 53 | fi 54 | 55 | if [ -n "${QUIET}" ]; then 56 | MARKDOWN_LINK_CHECK_CMD_PARAMS+=("--quiet") 57 | fi 58 | 59 | if [ -n "${VERBOSE}" ] || [ -n "${DEBUG}" ]; then 60 | MARKDOWN_LINK_CHECK_CMD_PARAMS+=("--verbose") 61 | fi 62 | 63 | print_info "Start checking..." 64 | 65 | if [ -n "${EXCLUDE}" ]; then 66 | print_info "Files/dirs that will be excluded:\n${EXCLUDE}" 67 | fi 68 | 69 | echo "${EXCLUDE}" > /tmp/fd_exclude_file 70 | 71 | # shellcheck disable=SC2086 72 | mapfile -d '' MARKDOWN_FILE_ARRAY < <(fd ${FD_CMD_PARAMS} --ignore-file /tmp/fd_exclude_file ${SEARCH_PATHS}) 73 | 74 | print_info "Running: markdown-link-check ${MARKDOWN_LINK_CHECK_CMD_PARAMS[*]} ${MARKDOWN_FILE_ARRAY[*]}" 75 | markdown-link-check "${MARKDOWN_LINK_CHECK_CMD_PARAMS[@]}" "${MARKDOWN_FILE_ARRAY[@]}" 76 | 77 | print_info "Checks completed..." 78 | -------------------------------------------------------------------------------- /lychee.toml: -------------------------------------------------------------------------------- 1 | # Configuration for lychee link checker 2 | # https://lychee.cli.rs/#/usage/config 3 | 4 | ############################# Cache ############################### 5 | 6 | # Enable link caching. This can be helpful to avoid checking the same links on 7 | # multiple runs 8 | cache = true 9 | 10 | # Discard all cached requests older than this duration 11 | max_cache_age = "1d" 12 | 13 | ############################# Runtime ############################# 14 | 15 | # Maximum number of concurrent link checks 16 | max_concurrency = 128 17 | 18 | ############################# Requests ############################ 19 | 20 | # Comma-separated list of accepted status codes for valid links. 21 | accept = [429, 999] 22 | 23 | ############################# Exclusions ########################## 24 | 25 | # Exclude URLs and mail addresses from checking (supports regex) 26 | exclude = [ 27 | # keep-sorted start 28 | # Ignore all URLs with '{ ... }' - BASH / Ansible variable in URL 29 | '%7B.*%7D', 30 | # Ignore all URLs with '$' - BASH variable in URL 31 | '\$', 32 | # Ignore all URLs which starts with 'file://' 33 | 'file://', 34 | # returns 403 when accessed from GitHub Action 35 | 'stackexchange\.com', 36 | # returns 403 when accessed from GitHub Action 37 | 'stackoverflow\.com', 38 | # keep-sorted end 39 | ] 40 | 41 | # Exclude these filesystem paths from getting checked 42 | exclude_path = [ 43 | "CHANGELOG.md", 44 | "package-lock.json", 45 | ] 46 | 47 | # Exclude all private IPs from checking 48 | # Equivalent to setting `exclude_private`, `exclude_link_local`, and 49 | # `exclude_loopback` to true 50 | exclude_all_private = true 51 | -------------------------------------------------------------------------------- /tests/test-bad-mdfile/bad.md: -------------------------------------------------------------------------------- 1 | # Non-existing link 2 | 3 | [https://non-existing-domain.com](https://non-existing-domain.com) 4 | -------------------------------------------------------------------------------- /tests/test1/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | # Non-existing link 2 | 3 | [https://non-existing-domain.com](https://non-existing-domain.com) 4 | -------------------------------------------------------------------------------- /tests/test1/excluded_file.md: -------------------------------------------------------------------------------- 1 | # Exclude Markdown file 2 | 3 | [https://gmail.com](https://gmail.com) 4 | -------------------------------------------------------------------------------- /tests/test2/normal.md: -------------------------------------------------------------------------------- 1 | # Good Markdown file 2 | 3 | [https://google.com](https://google.com) 4 | --------------------------------------------------------------------------------