GitHub Release Artifact Pruner #638
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
name: GitHub Release Artifact Pruner | |
on: | |
schedule: | |
- cron: '12 5 * * *' | |
workflow_dispatch: | |
jobs: | |
prune-drafts: | |
if: github.repository == 'hashicorp/vagrant-builders' | |
name: Prune stale releases | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Code Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- name: Prune Draft Releases | |
id: prune-draft | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
. ./.ci/.ci-utility-files/common.sh | |
# Prune draft releases over 2 days old | |
github_draft_release_prune "2" | |
- name: Prune Prereleases | |
id: prune-prerelease | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
. ./.ci/.ci-utility-files/common.sh | |
# Prune prereleases over 7 days old | |
github_prerelease_prune "7" |