Skip to content

clean repo - redirect hops #13

clean repo - redirect hops

clean repo - redirect hops #13

name: "clean repo - redirect hops"
on:
schedule:
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
workflow_dispatch:
permissions:
contents: read
jobs:
clean-repo:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Harden Runner
uses: step-security/harden-runner@ec9f2d5744a09debf3a187a3f4f675c53b671911 # v2.13.0
with:
egress-policy: audit
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
# Call clean repo
- name: Clean repo
id: clean-repo-step
uses: dotnet/docs-tools/cleanrepo@main
with:
function: "RemoveRedirectHops"
docfx_directory: "."
target_directory: "."
url_base_path: "/dotnet"
# Create the PR for the work done by the "clean repo" tool
- name: create-pull-request
uses: dotnet/actions-create-pull-request@v4
with:
branch: cleanrepo-remove-hops
title: "Monthly chores: Remove redirect hops"
commit-message: "Bot 🤖 generated CleanRepo tool run"
body: "Remove redirect hops, for example, if a -> b and b -> c, replace a -> b with a -> c. Contributes to #..."