A GitHub Action for customizing artifact cleanup with age-based removal, tag retention, and recent artifact preservation.
gha-remove-artifacts is a GitHub Action that customizes the cleanup of workflow artifacts. It solves the problem of uncontrolled artifact storage by allowing users to define retention policies based on age, release status, and recency. This helps optimize storage usage and maintain a clean CI/CD environment.
Developers and DevOps engineers using GitHub Actions who need to manage artifact storage efficiently, especially in repositories with frequent builds or limited storage.
It provides more granular control than GitHub's built-in retention settings, enabling automated, policy-based cleanup that respects important artifacts like releases while removing outdated ones.
GitHub Action to customize artifact cleanup
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Allows specifying custom retention periods like '1 month' or '2 years' using Moment.js parsing, providing more control than GitHub's fixed options.
Can skip artifacts associated with Git tags, ensuring release builds are kept long-term, as highlighted in the example use cases.
Option to retain a set number of most recent artifacts, preventing accidental deletion of current work, useful for maintaining recent CI/CD outputs.
Built-in handling of GitHub's API rate limits using octokit's throttling plugin, avoiding throttling issues during cleanup operations.
The project is marked as stable but not actively developed, which could mean no new features, bug fixes, or compatibility updates.
Uses Moment.js for date parsing, a legacy library that is deprecated in many modern JavaScript ecosystems, potentially causing dependency issues.
Exclusively designed for GitHub Actions, making it unsuitable for multi-platform or cross-CI/CD setups like Azure DevOps or CircleCI.
Requires setting up a cron schedule for cleanup, lacking real-time or event-driven deletion options for immediate storage management.