Prune old workflow runs #9
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 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@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .node-version | |
- uses: pnpm/action-setup@v2 | |
- run: pnpm i && pnpm pruneGithubWorkflowRuns | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
working-directory: .github/ts-tasks |