Update check-plugin-links.yml #16
This file contains hidden or 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 README for Broken Links | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| check-links: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install markdown-link-check | |
| run: npm install -g markdown-link-check | |
| - name: Check README links | |
| id: check-links | |
| run: | | |
| markdown-link-check README.md > link-check-results.txt || true | |
| - name: Annotate Results | |
| run: | | |
| if grep -q "ERROR" link-check-results.txt; then | |
| echo "::error title=Broken Links Found::$(cat link-check-results.txt | sed 's/%/%25/g; s/\n/%0A/g; s/\r/%0D/g')" | |
| else | |
| echo "::notice title=No Broken Links Found::All links are valid in the README." | |
| fi |