-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.3 KB
/
readme.yaml
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
name: Check links in README and generate badges
on:
workflow_call:
push:
paths:
- '.github/workflows/readme.yaml'
- 'README.md'
schedule:
# run twice a month (on 1st and 15th of every month at 12:00 UTC)
- cron: '0 12 1,15 * *'
jobs:
linkinator:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Linkinator
uses: JustinBeckwith/linkinator-action@v1
badges:
runs-on: ubuntu-latest
needs: linkinator
steps:
- name: Set values for failure badge
if: ${{ needs.linkinator.result == 'failure' }}
run: |
echo "MESSAGE=failing" >> $GITHUB_ENV
echo "COLOR=red" >> $GITHUB_ENV
- name: Set values for success badge
if: ${{ needs.linkinator.result == 'success' }}
run: |
echo "MESSAGE=passing - $(date --utc '+%b %d %Y at %R UTC')" >> $GITHUB_ENV
echo "COLOR=#44cc11" >> $GITHUB_ENV
- name: Create badge
uses: schneegans/[email protected]
with:
auth: ${{ secrets.GIST_SECRET }}
gistID: ${{ vars.GIST_ID }}
filename: braille_display_readme_badge.json
label: Readme links check
message: ${{ env.MESSAGE }}
color: ${{ env.COLOR }}
style: flat-square