-
Notifications
You must be signed in to change notification settings - Fork 18
105 lines (90 loc) · 2.92 KB
/
Copy pathci.yaml
File metadata and controls
105 lines (90 loc) · 2.92 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: CI
on:
push:
branches: [main]
pull_request:
schedule:
# Mondays at 14:00 UTC, so broken links surface even between contributions.
- cron: "0 14 * * 1"
workflow_dispatch:
# Cancel in-progress runs for pull requests when developers push new changes.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
permissions:
contents: read
jobs:
format:
name: Check formatting
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: latest
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Validate formatting
run: bun fmt:ci
lint-awesome:
name: Lint awesome list
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2
with:
bun-version: latest
- name: Run awesome-lint
run: bun x awesome-lint
lint-typos:
name: Check for typos
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Run typos
uses: crate-ci/typos@37bb98842b0d8c4ffebdb75301a13db0267cef89 # v1.47.2
with:
config: .github/typos.toml
link-check:
name: Check links
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
steps:
- name: Check out code
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Run lychee
id: lychee
uses: lycheeverse/lychee-action@8646ba30535128ac92d33dfc9133794bfdd9b411 # v2.8.0
with:
args: >-
--verbose
--no-progress
--max-concurrency 4
--retry-wait-time 5
--accept 200,206,403,429
'./**/*.md'
fail: ${{ github.event_name == 'push' || github.event_name == 'pull_request' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Open or update an issue when the scheduled run fails
if: failure() && github.event_name == 'schedule'
uses: peter-evans/create-issue-from-file@e8ef132d6df98ed982188e460ebb3b5d4ef3a9cd # v5.0.1
with:
title: Broken links detected by scheduled link check
content-filepath: ./lychee/out.md
labels: broken-links, automated