Skip to content

clean repo - images #19

clean repo - images

clean repo - images #19

name: "clean repo - images"
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@e3f713f2d8f53843e71c69a996d56f51aa9adfb9 # v2.14.1
with:
egress-policy: audit
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
# Call clean repo
- name: Clean repo
id: clean-repo-step
uses: dotnet/docs-tools/cleanrepo@main
with:
function: "FindOrphanedImages"
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@c0f553fe549906ede9cf27b5156039d195d2ece0 #v8.1.0
with:
branch: cleanrepo-orphaned-images
title: "Monthly chores: Delete orphaned images"
commit-message: "Bot 🤖 generated CleanRepo tool run"
body: "Find and delete orphaned images. Contributes to #..."