Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Delete GitHub Actions Cache with ease.

License

NotificationsYou must be signed in to change notification settings

toshimaru/delete-action-cache

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

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Test

Delete Action Cache

Delete GitHub Actions cache with ease.

OG image

Motivation

GitHub Actions cache is limited to 10GB per repository. If you use a lot of cache storage, you may see the following warning message:

Approaching total cache storage limit (XX GB of 10 GB Used)

Least recently used caches will be automatically evicted to limit the total cache storage to 10 GB.Learn more about cache usage.

The documentation says:

GitHub will remove any cache entries that have not been accessed in over 7 days. There is no limit on the number of caches you can store, but the total size of all caches in a repository is limited to 10 GB. Once a repository has reached its maximum cache storage, the cache eviction policy will create space by deleting the oldest caches in the repository.

Usage limits and eviction policy - GitHub Docs

To prevent reaching this limit, it’s essential to delete unused or unnecessary caches automatically.

Usage

Delete caches after a pull request is closed/merged

name:Delete Action Cacheon:pull_request_target:types:[closed]jobs:delete-cache:runs-on:ubuntu-lateststeps:      -uses:toshimaru/delete-action-cache@main

Delete caches manually

Use theworkflow_dispatch event to trigger the action manually.

name:Delete Action Cacheon:workflow_dispatch:jobs:delete-cache:runs-on:ubuntu-lateststeps:      -uses:toshimaru/delete-action-cache@main
  • Select a branch from dropdown menu
  • Click "Run workflow"
  • The action deletes the branch caches

See also.Manually running a workflow - GitHub Docs

Schedule cache deletion

Delete caches periodically with theschedule event.

name:delete action cacheon:schedule:    -cron:'0 3 * * *'jobs:delete-cache:runs-on:ubuntu-lateststeps:      -uses:toshimaru/delete-action-cache@mainbranch:my-cache-branch

Inputs

Seeaction.yml

NameDescriptionDefault
github-tokenA token for the repositorygithub.token
limitThe number of caches to delete100
branchThe branch name where the cache is stored- (default branch)
repoThe repository namegithub.repository

Supported Events

  • pull_request
  • pull_request_target
  • workflow_dispatch
  • schedule
  • push

About

Delete GitHub Actions Cache with ease.

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Contributors3

  •  
  •  
  •  

[8]ページ先頭

©2009-2025 Movatter.jp