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.
- name: Delete Cacheuses: useblacksmith/cache-delete@v1with:
key: Linux-composer-ecf6e2e236589e4d34ba89662b6bc2afe8e15237cd19a13df9dc0cb599ff4826version: v213asda2cf # Optional: specific version to delete| Input | Description | Required | Default |
|---|---|---|---|
key | The cache key to delete | No* | - |
version | Specific version of the cache to delete | No | - |
prefix | Treat key as a prefix for bulk deletion | No | false |
* Required unless prefix is true, in which case it can be empty to match all cache keys
- name: Delete All Cache Versionsuses: useblacksmith/cache-delete@v1with:
key: npm-cache- name: Delete Specific Cache Versionuses: useblacksmith/cache-delete@v1with:
key: npm-cacheversion: v1.0- name: Delete All npm Cachesuses: useblacksmith/cache-delete@v1with:
key: npm-prefix: true- name: Delete All Cachesuses: useblacksmith/cache-delete@v1with:
key: ""prefix: trueThe 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
This project is licensed under the MIT License - see the LICENSE file for details.