Skip to content

Cleanup Old Artifacts #3

Cleanup Old Artifacts

Cleanup Old Artifacts #3

name: Cleanup Old Artifacts
on:
workflow_dispatch:
inputs:
days_to_keep:
description: "Number of days to keep artifacts"
required: true
default: 30
type: number
schedule:
- cron: '0 0 */15 * *' # Runs every 15 days at midnight UTC
permissions:
contents: read
actions: write
jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run Artifact Cleanup
env:
GH_TOKEN: ${{ secrets.REPO_TOKEN }}
REPO_OWNER: ${{ github.repository_owner }}
REPO_NAME: ${{ github.repository }}
DAYS_TO_KEEP: ${{ github.event.inputs.days_to_keep || '15' }}
run: |-
make cleanup_artifacts \
REPO_OWNER="${REPO_OWNER}" \
REPO_NAME="${REPO_NAME}" \
DAYS_TO_KEEP="${DAYS_TO_KEEP}"