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

GitHub Action

adapttive/cache-delete

v1

adapttive/cache-delete

archive

adapttive/cache-delete

Purge Github Actions caches for a repository

Installation

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

              

- name: adapttive/cache-delete

uses: adapttive/cache-delete-action@v1

Learn more about this action in adapttive/cache-delete-action

Choose a version

cache-delete-action

Setup

your-job-1:
    runs-on: ubuntu-latest
    name: 'production: build'

    - name: Cache Build
      id: cache-build
      uses: actions/cache/save@v3
      with:
        path: ${{ github.workspace }}/your-folder-to-cache
        key: ${{ github.sha }}-your-cache-key

cleanup:
    runs-on: ubuntu-latest
    needs: ['your-job-1']
    name: 'cache cleanup'

    steps:
    - uses: adapttive/cache-delete
      with:
        github-token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
        cache-key: ${{ github.sha }}-your-cache-key