-
Notifications
You must be signed in to change notification settings - Fork 39
65 lines (54 loc) · 1.99 KB
/
url-checks.yaml
File metadata and controls
65 lines (54 loc) · 1.99 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow scans the markdown files in the repository for broken URLs.
# Additional logic is added to the Make command verify-rate-limited-links-ci to check for rate-limited URLs, including guidance on what domains to ignore.
# The workflow is scheduled to run every Monday at 2PM UTC.
on:
schedule:
# Every Monday at 2PM UTC
- cron: '0 14 * * 1'
workflow_dispatch:
concurrency:
group: url-${{ github.ref }}
cancel-in-progress: true
name: Broken URL check
jobs:
markdown-link-check:
runs-on: ubuntu-latest
steps:
- id: checkout
name: Checkout Repository
uses: actions/checkout@v6
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Nodejs
uses: actions/setup-node@v6
with:
node-version: "22"
- name: Install Dependencies
run: npm ci
- name: URL Checker
run: make verify-url-links-ci
- name: URL Rate Limit Checker
run: make verify-rate-limited-links-ci
- name: Check for Broken Developer Portal Links
run: make verify-developer-portal-links
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Post Comment
run: |
cd scripts
./url-checker.sh
env:
ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OWNER: ${{ github.repository_owner }}
REPO: ${{ github.event.repository.name }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }}
- name: Failure Slack Notification
if: ${{ failure() }}
uses: rtCamp/action-slack-notify@v2.3.3
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_PRIVATE_TEAM_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACKIFY_MARKDOWN: true
ENABLE_ESCAPES: true
SLACK_MESSAGE: 'The url-checks job in `${{ github.repository }}` failed. [View details](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).'