Skip to content

GitHub Action that can clean up old artifacts on a regular schedule

Notifications You must be signed in to change notification settings

glassechidna/artifact-cleaner

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is an action that you can run on a regular basis to clean up outdated workflow run artifacts before their typical 90 day expiry.

By default, all artifacts are deleted. There are options to only delete big artifacts, artifacts of a certain age or ones with a specific name.

Suggested usage is in a standalone workflow doc at .github/workflows/cleanup.yml with the following content:

name: clean artifacts

on:
  schedule:
    - cron: '0 0 * * *'

jobs:
  clean:
    runs-on: ubuntu-latest
    steps:
      - name: cleanup
        uses: glassechidna/artifact-cleaner@master
        with:
          minimumAge: 86400 # all artifacts at least one day old

This cleans all artifacts once a day.