t2: further clarifications #159
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: Link Check | |
| # Skip when commit message contains [skip ci], [ci skip], [no ci], [skip actions], or [actions skip] | |
| # (GitHub natively skips workflows for push/pull_request when these are in the commit message) | |
| on: | |
| push: | |
| branches: ["**"] | |
| pull_request: | |
| branches: ["**"] | |
| jobs: | |
| should-run: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| run: ${{ steps.check.outputs.run }} | |
| steps: | |
| - id: check | |
| run: | | |
| if [ "${{ github.event_name }}" = "pull_request" ]; then | |
| echo "run=true" >> $GITHUB_OUTPUT | |
| else | |
| count=$(gh pr list --head "${{ github.ref_name }}" --state open --json number --jq 'length' 2>/dev/null || echo "0") | |
| [ "$count" -gt 0 ] && echo "run=false" >> $GITHUB_OUTPUT || echo "run=true" >> $GITHUB_OUTPUT | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| link-check: | |
| needs: should-run | |
| if: needs.should-run.outputs.run == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Check links in documents | |
| uses: lycheeverse/lychee-action@v2 | |
| with: | |
| args: > | |
| --verbose | |
| --no-progress | |
| --exclude "https://www\\.etsi\\.org/deliver/" | |
| --exclude "https://www\\.iso\\.org/standard/" | |
| --exclude "eu-digital-identity-wallet\\.github\\.io.*annex-2-high-level-requirements" | |
| --exclude "COMPREHENSIVE-CATALOGUE" | |
| --exclude "ec\\.europa\\.eu/tools/lotl/pivot-lotl-" | |
| --exclude "http://uri\\.etsi\\.org/" | |
| --exclude "http://www\\.tlsox\\.xyz/" | |
| --exclude "http://www\\.w3\\.org/2001/10/xml-" | |
| --exclude "webuild-consortium/wp4-trust-group/blob/main/docs/wp23-stock-takings/STOCKTAKING-TO-ISSUES" | |
| . | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| fail: true | |
| failIfEmpty: true | |
| markdownlint: | |
| needs: should-run | |
| if: needs.should-run.outputs.run == 'true' | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "20" | |
| - name: Run markdownlint | |
| run: npx --yes markdownlint-cli2 "**/*.md" "#.github" "#docs/sectorial-authorities-banking-brief.md" |