Add Library Registry access control system #56
Workflow file for this run
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
name: Check ToC | |
# See: https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows | |
on: | |
push: | |
paths: | |
- ".github/workflows/check-toc.yml" | |
- "README.md" | |
- "FAQ.md" | |
pull_request: | |
paths: | |
- ".github/workflows/check-toc.yml" | |
- "README.md" | |
- "FAQ.md" | |
workflow_dispatch: | |
repository_dispatch: | |
jobs: | |
check: | |
name: ${{ matrix.file.name }} | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
file: | |
- name: README.md | |
# Max ToC depth, for use with the markdown-toc --maxdepth flag. | |
maxdepth: 4 | |
- name: FAQ.md | |
maxdepth: 3 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Install markdown-toc | |
run: sudo npm install --global markdown-toc | |
- name: Rebuild ToC | |
run: | | |
markdown-toc \ | |
--bullets=- \ | |
--maxdepth=${{ matrix.file.maxdepth }} \ | |
-i \ | |
"${{ github.workspace }}/${{ matrix.file.name }}" | |
- name: Check ToC | |
run: git diff --color --exit-code |