-
Notifications
You must be signed in to change notification settings - Fork 5.9k
43 lines (36 loc) · 1.25 KB
/
cleanrepo-relative-links.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
41
42
43
name: "clean repo - relative links"
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@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
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: "ReplaceWithRelativeLinks"
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-relative-links
title: "Monthly chores: Use relative links"
commit-message: "Bot 🤖 generated CleanRepo tool run"
body: "Find and replace absolute links with relative links. Contributes to #..."