forked from williamfiset/Algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (30 loc) · 1.08 KB
/
readme-url-checker.yml
File metadata and controls
35 lines (30 loc) · 1.08 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
# Use awesome bot to verify that all URLs in the README are valid.
name: README URL Checker
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2
# Disable bundler-cache since we aren't using a Gemfile
bundler-cache: false
- name: Install Awesome Bot
# We install it globally so we don't need bundle exec
run: gem install awesome_bot
# TODO: Cache the result of awesome_bot requests, we don't need to check
# if a link is valid for every commit/PR all the time, we should be able
# to cache the result for a couple days.
- name: Run Awesome Bot
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Call the command directly
awesome_bot README.md --allow-dupe --allow-redirect --allow 429