Skip to content

Redirect Scan

Redirect Scan #179

Workflow file for this run

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>