.github/workflows/prune.yml #591
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@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- 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 }} |