-
Notifications
You must be signed in to change notification settings - Fork 10
54 lines (47 loc) · 1.55 KB
/
lychee.yml
File metadata and controls
54 lines (47 loc) · 1.55 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
name: Links
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "45 3 * * *"
permissions:
contents: write
id-token: write
jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # Pinned at v2.8.0
continue-on-error: true
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
with:
args: --max-retries 20 app/views/content
fail: true
- name: Read Lychee output into var
id: lychee-output
if: ${{steps.lychee.outcome}} == "failure"
run: |
DATA=$(cat ./lychee/out.md)
echo "LYCHEE_OUTPUT<<EOF" >> $GITHUB_ENV
echo "$DATA" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
# - name: Slack Markdown Converter
# id: convert
# if: ${{steps.lychee.outcome}} == "failure"
# uses: LoveToKnow/slackify-markdown-action@698a1d4d0ff1794152a93c03ee8ca5e03a310d4e # Pinned at v1.1.1
# with:
# text: |
# ${{ env.LYCHEE_OUTPUT }}
- name: Notify teams channel on job failure
if: ${{steps.lychee.outcome}} == "failure"
uses: DFE-Digital/github-actions/send-to-teams-channel@master
with:
teams-webhook-url: ${{ secrets.TEAMS_WEBHOOK_URL }}
title: 'External link check results:'
service: ${{ vars.TEAMS_MSG_SERVICE_NAME }}
message: |
${{ env.LYCHEE_OUTPUT }}