Skip to content

check-broken-links #333

check-broken-links

check-broken-links #333

name: check-broken-links
on:
schedule:
- cron: "8 8 * * 0"
pull_request:
types: [opened, synchronize]
paths:
- .github/workflows/check-broken-links.yml
push:
branches:
- main
paths:
- .github/workflows/check-broken-links.yml
permissions: read-all
jobs:
my-broken-link-checker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Check - container
# Unpinned Actions Full Length Commit SHA
# kics-scan ignore-line
uses: ./
with:
url: https://rust-lang.github.io/mdBook/
cmd_params: --verbose --color=always --ignore-fragments --one-page-only --buffer-size=8192
- name: Check - simple
env:
INPUT_URL: https://rust-lang.github.io/mdBook/
INPUT_CMD_PARAMS: --verbose --color=always --ignore-fragments --one-page-only --buffer-size=8192
run: ./entrypoint.sh
- name: Check - simple - local pages
env:
INPUT_URL: https://my-testing-domain.com
INPUT_PAGES_PATH: ./tests/
INPUT_CMD_PARAMS: --skip-tls-verification --verbose --color=always --buffer-size=8192
run: ./entrypoint.sh
build-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Create web page
run: |
mkdir -v public
cat > public/index.html << EOF
<!DOCTYPE html>
<html>
<head>
My page which will be stored on my-testing-domain.com domain
</head>
<body>
Links:
<ul>
<li><a href="https://my-testing-domain.com">https://my-testing-domain.com</a></li>
<li><a href="https://my-testing-domain.com:443">https://my-testing-domain.com:443</a></li>
</ul>
</body>
</html>
EOF
- name: Check links using script
env:
INPUT_URL: https://my-testing-domain.com
INPUT_PAGES_PATH: ./public/
INPUT_CMD_PARAMS: --skip-tls-verification --verbose --color=always --buffer-size=8192
INPUT_DEBUG: true
run: ./entrypoint.sh
- name: Check links using container
# kics-scan ignore-line
uses: ./
with:
url: https://my-testing-domain.com
pages_path: ./public/
cmd_params: --skip-tls-verification --verbose --color=always --buffer-size=8192
debug: true