clean repo - redirect hops #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
# Call clean repo | |
- name: Clean repo | |
id: clean-repo-step | |
uses: dotnet/docs-tools/cleanrepo@main | |
with: | |
function: "RemoveRedirectHops" | |
docfx_directory: "." | |
target_directory: "docs" | |
url_base_path: "/dotnet" | |
# Create the PR for the work done by the "clean repo" tool | |
- name: create-pull-request | |
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f | |
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 #..." |