forked from hyperledger/fabric
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 1.45 KB
/
broken-link-checker.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# Copyright the Hyperledger Fabric contributors. All rights reserved.
#
# SPDX-License-Identifier: Apache-2.0
name: "Broken Link Checker"
on:
workflow_dispatch:
schedule:
- cron: "50 1 * * *"
pull_request:
paths:
- .github/workflows/broken-link-checker.yml
env:
GO_VER: 1.23.1
permissions:
contents: read
jobs:
broken-lint-checker:
# Only run the scheduled job in hyperledger/fabric repository, not on personal forks
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'hyperledger/fabric')
name: "Check for Broken Links"
runs-on: ${{ github.repository == 'hyperledger/fabric' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
steps:
- name: Checkout Fabric Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VER }}
- name: Install Muffet
run: go install github.com/raviqqe/muffet/v2@latest
- name: Check Broken Links with Muffet
# Exclude any links that direct to the documentation or release notes of the non-latest version to limit the scanning to target to that of the latest version.
run: muffet --max-response-body-size=100000000 --rate-limit=10 --timeout=20 --buffer-size=2147483647 --color=always --exclude="^(https:\/\/hyperledger-fabric.readthedocs.io\/[A-z_]+\/(v[\d]+.[\d]+.[\d]+|release)).*$" https://hyperledger-fabric.readthedocs.io/en/latest/