cleanup-workflow-runs #785
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
# This workflow prunes old workflow runs for an entire repository. | |
name: cleanup-workflow-runs | |
on: | |
schedule: | |
- cron: "0 0 * * *" # GMT | |
workflow_dispatch: | |
jobs: | |
cleanup: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Cleanup of obsolete workflow runs | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const script = require('./.github/actions/workflow-cleanup/index.js') | |
await script({ github, context, core, exec }); |