48 lines (39 loc) · 1.13 KB
/
url-auditor.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
name: URL validator
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
- dev
jobs:
Pre-Commit:
name: Run brok Against files in repo
runs-on: ubuntu-latest
container:
image: debian:bullseye-slim
steps:
- name: Install System Deps
run: |
apt-get update
apt-get install -y wget libtinfo5
- uses: actions/checkout@v2
- name: Get Date
id: get-date
run: |
echo "::set-output name=date::$(/bin/date -u "+%Y%m")"
shell: bash
- uses: actions/cache@v2
with:
path: .brokdb
key: ${{ hashFiles('.github/workflows/url-auditor.yml') }}-${{ hashFiles('.brokignore') }}-${{ steps.get-date.outputs.date }}
- name: Install brok
run: |
wget https://github.com/smallhadroncollider/brok/releases/download/1.1.0/brok-1.1.0_x86-64-linux.deb
dpkg -i brok-1.1.0_x86-64-linux.deb
- name: Run brok
run: |
brok --ignore $(cat .brokignore | grep -v '^#') $(find . -type f -name "*.yml") $(find path -type f -name "*.yml") $(find . -type f -name "*.md") > /dev/null