Clean Logs #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 Logs | |
on: | |
workflow_dispatch: | |
inputs: | |
runs_older_than: | |
description: "The amount of days old to delete" | |
default: "7" | |
required: false | |
runs_to_keep: | |
description: "The amount of latest workflows runs to keep" | |
default: "0" | |
required: false | |
jobs: | |
clean-logs: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
- uses: igorjs/gh-actions-clean-workflow@main | |
with: | |
runs_older_than: ${{ github.event.inputs.runs_older_than }} | |
runs_to_keep: ${{ github.event.inputs.runs_to_keep }} |