.github/workflows/prune.yml #243
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
on: | |
schedule: | |
- cron: '12 5 * * *' | |
workflow_dispatch: | |
jobs: | |
prune-builder: | |
name: Prune stale drafts and prereleases | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3 | |
- name: Prune any drafts older than 20 days | |
run: . ./.ci/load-ci.sh && github_draft_release_prune "20" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Only retain last 10 prereleases | |
run: . ./.ci/load-ci.sh && github_release_prune_retain "prerelease" "10" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |