Skip to content

Commit 4f059f2

Browse files
authored
Create orphaned-includes.yml
1 parent c2cf1a0 commit 4f059f2

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: "clean repo - includes"
2+
3+
on:
4+
schedule:
5+
- cron: "0 1 1 * *" # Runs at 01:00, on day 1 of the month
6+
workflow_dispatch:
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
clean-repo:
13+
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
16+
pull-requests: write
17+
18+
steps:
19+
- name: Harden Runner
20+
uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1
21+
with:
22+
egress-policy: audit
23+
24+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
25+
26+
# Call clean repo
27+
- name: Clean repo
28+
id: clean-repo-step
29+
uses: dotnet/docs-tools/cleanrepo@1c13adc87741beab84bb6e286d17b3b95ce687d8
30+
with:
31+
function: 'FindOrphanedIncludes'
32+
docfx_directory: '.'
33+
target_directory: 'docs'
34+
url_base_path: '/dotnet'
35+
36+
# Create the PR for the work done by the "clean repo" tool
37+
- name: create-pull-request
38+
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f
39+
with:
40+
branch: create-cleanrepo-pull-request/patch
41+
title: "Monthly chores: Delete orphaned include files"
42+
commit-message: 'Bot 🤖 generated CleanRepo tool run'
43+
body: "Find and delete orphaned include files. Contributes to #..."

0 commit comments

Comments
 (0)