Skip to content
You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
database

GitHub Action

Purge cache

v1

Purge cache

database

Purge cache

Purge GitHub Actions cache

Installation

Copy and paste the following snippet into your .yml file.

              

- name: Purge cache

uses: MyAlbum/purge-cache@v1

Learn more about this action in MyAlbum/purge-cache

Choose a version

purge-cache

This action allows the cache of GitHub Actions to be automatically purged

Basic usage

See action.yml

steps:
# Do other steps like checkout, install, compile, etc.
- uses: MyAlbum/purge-cache
  with:
    max-age: 604800 # Cache max 7 days since last use (this is the default)

Other options

Debug

Output debug data (defaults to false)

  • Number of caches
  • Skipped caches
  • Deleted caches
steps:
# Do other steps like checkout, install, compile, etc.
- uses: MyAlbum/purge-cache
  with:
    debug: true # Set to true to output debug info

Token

Set a GitHub token, will default to ${github.token}. This will probably not be nessesary as the default token should be sufficient

steps:
# Do other steps like checkout, install, compile, etc.
- uses: MyAlbum/purge-cache
  with:
    token: $GITHUBTOKEN # Set a GitHub token