-
Notifications
You must be signed in to change notification settings - Fork 603
40 lines (38 loc) · 1.16 KB
/
redirect-scan.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
name: Redirect Scan
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * 1,4" # At 07:00 on Monday and Thursday
jobs:
scan:
name: Redirect Scan
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Validate URLs
uses: mathiasvr/command-output@v2.0.0
id: mutate
with:
run: bundle exec rake validate:redirects
- name: Check for Changes
run: bash .github/check_for_changes.sh
id: check
- name: Replace blogs.json
if: steps.check.outputs.changes == 'true'
run: mv new_blogs.json blogs.json
- name: Create Pull Request
if: steps.check.outputs.changes == 'true'
uses: peter-evans/create-pull-request@v5
with:
add-paths: |
blogs.json
commit-message: "URL redirect scan."
title: "URL redirect scan"
branch: auto-${{ github.run_id }}
delete-branch: true
body: "${{ steps.mutate.outputs.stdout }}"
committer: GitHub <noreply@github.com>
author: GitHub <noreply@github.com>