# Copied from https://poweruser.blog/storage-housekeeping-on-github-actions-e2997b5b23d1

name: 'nightly artifacts cleanup'
on:
  schedule:
    - cron: '0 4 * * *' # every night at 4 am UTC

jobs:
  delete-artifacts:
    runs-on: ubuntu-latest
    steps:
      - uses: kolpav/purge-artifacts-action@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          expire-in: 14days

Clean workflow artifacts older than 14 days
Clean workflow artifacts older than 14 days