Skip to content

NFIBrokerage/gha-remove-artifacts

 
 

Repository files navigation

gha-remove-artifacts

GitHub Action to remove old artifacts

Status and support

  • ✔ stable
  • ✔ supported
  • ✖ no ongoing development

CI

GitHub Action Artifacts are removed after 90 days. This cannot be configured either globally or per project. There's also a limit on free artifact space after which it becomes a payed resource. There's no configurable storage limit per project either, so some projects might use up all quota and not leave room for others.

We created this Action to solve these problems. It

  • removes artifacts that are older than the specified age
  • has the option to keep release (tagged) artifacts
  • respects GitHub's rate limit

Usage

Add the following workflow to your repository and configure options.

.github/workflows/remove-old-artifacts.yml

name: Remove old artifacts

on:
  schedule:
    # Every day at 1am
    - cron: '0 1 * * *'

jobs:
  remove-old-artifacts:
    runs-on: ubuntu-latest
    timeout-minutes: 10

    steps:
    - name: Remove old artifacts
      uses: c-hive/gha-remove-artifacts@v1
      with:
        age: '1 month'
        skip-tags: true

Conventions

This project follows C-Hive guides for code style, way of working and other development concerns.

License

The project is available as open source under the terms of the MIT License.

About

GitHub Action to remove old artifacts

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 100.0%