Skip to content

Schedule - Cleanup

Schedule - Cleanup #28

name: Schedule - Cleanup
on:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
cleanup_runs:
runs-on: ubuntu-latest
permissions:
actions: write
contents: read
steps:
- name: Generate Token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1
id: app-token
with:
app-id: ${{ secrets.PRIVATE_APP_ID }}
private-key: ${{ secrets.PRIVATE_APP_KEY }}
owner: ${{ github.repository_owner }}
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@4c9f24749b7996562658e3d6e10662489e22caca # v2
with:
token: "${{ steps.app-token.outputs.token }}"
repository: "${{ github.repository }}"
retain_days: "7"
keep_minimum_runs: "10"