Skip to content

Prune old workflow runs #61

Prune old workflow runs

Prune old workflow runs #61

# This workflow runs periodically to delete obsolete workflow runs of workflows that don't exist anymore in the repo.
# This is the keep the Workflow list on the left here https://github.com/aptos-labs/aptos-core/actions tidy.
# The only way to remove a workflow from that list is to delete _all_ runs of a workflow.
name: Prune old workflow runs
on:
workflow_dispatch:
schedule:
# every day at 3am PST
- cron: "0 10 * * *"
permissions:
actions: write
jobs:
prune:
if: github.repository == 'aptos-labs/aptos-core'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # pin@v3
- uses: actions/setup-node@969bd2663942d722d85b6a8626225850c2f7be4b # pin@v3
with:
node-version-file: .node-version
- uses: pnpm/action-setup@537643d491d20c2712d11533497cb47b2d0eb9d5 # pin https://github.com/pnpm/action-setup/releases/tag/v2.2.3
- run: pnpm i && pnpm pruneGithubWorkflowRuns
env:
GITHUB_TOKEN: ${{ github.token }}
working-directory: .github/ts-tasks