Skip to content

Repository files navigation

Blacksmith Cache Delete Action

A GitHub Action to delete caches from Blacksmith's cache storage. This action allows you to delete either a specific cache version or all versions of a cache key. This action only works Blacksmith runners.

Usage

- name: Delete Cacheuses: useblacksmith/cache-delete@v1with:
key: Linux-composer-ecf6e2e236589e4d34ba89662b6bc2afe8e15237cd19a13df9dc0cb599ff4826version: v213asda2cf # Optional: specific version to delete

Inputs

InputDescriptionRequiredDefault
keyThe cache key to deleteNo*-
versionSpecific version of the cache to deleteNo-
prefixTreat key as a prefix for bulk deletionNofalse

* Required unless prefix is true, in which case it can be empty to match all cache keys

Examples

Delete All Versions of a Cache

- name: Delete All Cache Versionsuses: useblacksmith/cache-delete@v1with:
key: npm-cache

Delete a Specific Cache Version

- name: Delete Specific Cache Versionuses: useblacksmith/cache-delete@v1with:
key: npm-cacheversion: v1.0

Delete All Caches with a Prefix

- name: Delete All npm Cachesuses: useblacksmith/cache-delete@v1with:
key: npm-prefix: true

Delete All Caches

- name: Delete All Cachesuses: useblacksmith/cache-delete@v1with:
key: ""prefix: true

Error Handling

The action will:

  • Fail if the cache deletion request fails (non-404 error)
  • Log a message if the cache is not found (404)
  • Successfully complete if the cache is deleted

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages

Generated from threeal/action-starter