Skip to content

GitHub Release Artifact Pruner #638

GitHub Release Artifact Pruner

GitHub Release Artifact Pruner #638

Workflow file for this run

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"