runtime_tips.md format batch section short topics #791
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Check links on the 21st day of the month. | |
# 21st as the first letter of this repo is the 21st letter in the alphabet. | |
on: | |
push: | |
pull_request: | |
schedule: | |
- cron: "0 0 21 * *" | |
name: check-links | |
jobs: | |
check-links: | |
runs-on: ubuntu-latest | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v2 | |
#- name: Remove lines with false positives | |
# run: | | |
# sed -i 's/.*check_links.yaml.*//g' README.md | |
# sed -i 's/.*check_spelling.yaml.*//g' README.md | |
# The link checker will only work if mlc_config.json is a valid JSON | |
- name: Validate JSON | |
uses: docker://orrosenblatt/validate-json-action:latest | |
env: | |
INPUT_SCHEMA: .github/workflows/valid_json_schema.json | |
INPUT_JSONS: mlc_config.json | |
# If there is a valid external link that fails, | |
# add it to mlc_config.json | |
- name: External links must be checked, do not allow '0' in the 'aliveStatusCodes' of mlc_config.json | |
run: if [[ $(grep --regexp "[^0-9]0[^0-9]" mlc_config.json | wc --lines) == "1" ]]; then echo "FOUND"; exit 42; fi | |
- name: Internal links must checked, do not allow '400' in the 'aliveStatusCodes' of mlc_config.json | |
run: if [[ $(grep --regexp "[^0-9]400[^0-9]" mlc_config.json | wc --lines) == "1" ]]; then echo "FOUND"; exit 42; fi | |
# Need '../' as path, else the command will search in './node_modules/*' | |
# Full command as could be found in log: | |
# | |
# find . -name '*.md' -not -path './node_modules/*' -exec markdown-link-check '{}' --config mlc_config.json ';' | |
- uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
config-file: 'mlc_config.json' | |
use-quiet-mode: 'yes' | |
use-verbose-mode: 'no' | |