Skip to content

Update 0x92-Appendix-C_Cryptography.md #2201

Update 0x92-Appendix-C_Cryptography.md

Update 0x92-Appendix-C_Cryptography.md #2201

Workflow file for this run

name: URL Checker
on:
pull_request:
paths:
- '5.0/**'
push:
branches:
- master
paths:
- '5.0/**'
workflow_dispatch:
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- name: Install markdown-link-check
run: npm i -g markdown-link-check@3.14.2
- name: Determine files to check
id: files
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
git diff --name-only --diff-filter=AM origin/${{ github.base_ref }} -- 5.0/ | grep '\.md$' > /tmp/files_to_check.txt || true
echo "mode=modified" >> $GITHUB_OUTPUT
else
find 5.0 -name '*.md' -not -path './node_modules/*' > /tmp/files_to_check.txt
echo "mode=all" >> $GITHUB_OUTPUT
fi
echo "Checking files (mode: $(cat $GITHUB_OUTPUT | grep mode | cut -d= -f2)):"
cat /tmp/files_to_check.txt
- name: Check URLs
run: |
ERROR_FOUND=0
while IFS= read -r file; do
if [ -n "$file" ]; then
markdown-link-check "$file" --config .github/workflows/config/url-checker-config.json -q || ERROR_FOUND=1
fi
done < /tmp/files_to_check.txt
if [ "$ERROR_FOUND" -eq 1 ]; then
echo ""
echo "ERROR: Dead links were found!"
exit 1
else
echo ""
echo "All links are good!"
fi