-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (46 loc) · 1.96 KB
/
links.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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
---
name: Check external links
on:
push:
workflow_dispatch:
schedule:
- cron: 0 3 1 * *
pull_request:
paths:
- .github/workflows/links.yml
jobs:
lint:
name: links-check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # v4
- name: Get Current Timestamp
id: timestamp
run: echo "TIMESTAMP=$(date +%s)" >> "$GITHUB_ENV"
- name: Restore lychee cache
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # v4
with:
path: .lycheecache
key: cache-lychee-${{ env.TIMESTAMP }}
restore-keys: cache-lychee-
- name: Link Checker
uses: lycheeverse/lychee-action@7cd0af4c74a61395d455af97419279d86aafaede # v2.0.2
with:
fail: true
args: -c ./lychee-links.toml --base . --cache --max-cache-age 1d . --verbose --no-progress '*.md' './**/*.md'
token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Issue From File
if: failure() && github.event_name == 'schedule'
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5
with:
title: Link Checker Report
content-filepath: ./lychee/out.md
labels: report, automated issue
- name: Notify in Slack in case of failure
id: slack-notification
if: failure() && github.event_name == 'schedule'
uses: camunda/infraex-common-config/.github/actions/report-failure-on-slack@1b6af8e7117e4e9bdf777911b7a724879b59fcfe # 1.2.4
with:
vault_addr: ${{ secrets.VAULT_ADDR }}
vault_role_id: ${{ secrets.VAULT_ROLE_ID }}
vault_secret_id: ${{ secrets.VAULT_SECRET_ID }}