Allow resetting ALL GitHub Actions caches

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-01-06 19:17:55 +00:00 committed by Pedro Algarvio
parent 9fceadbdf1
commit 75d9ad72fe
3 changed files with 5 additions and 4 deletions

View file

@ -26,6 +26,7 @@ on:
env:
COLUMNS: 160
CACHE_SEED: SEED-0 # Bump the number to invalidate all caches
permissions:
contents: read # for dorny/paths-filter to fetch a list of changed files

View file

@ -80,7 +80,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
key: ${{ env.CACHE_SEED }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
# Skip jobs if nox.*.tar.* is already cached
- name: Set up Python ${{ inputs.python-version }}
@ -173,7 +173,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
key: ${{ env.CACHE_SEED }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ inputs.python-version }}|${{ hashFiles('requirements/**/*.txt') }}
- name: Set up Python ${{ inputs.python-version }}
uses: actions/setup-python@v4

View file

@ -80,7 +80,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
key: ${{ env.CACHE_SEED }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
# Skip jobs if nox.*.tar.* is already cached
- name: PyPi Proxy
@ -175,7 +175,7 @@ jobs:
uses: actions/cache@v3
with:
path: nox.${{ inputs.distro-slug }}.tar.*
key: testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
key: ${{ env.CACHE_SEED }}|testrun-deps|${{ inputs.distro-slug }}|${{ inputs.nox-session }}|${{ matrix.transport }}|${{ hashFiles('requirements/**/*.txt', 'cicd/golden-images.json') }}
- name: PyPi Proxy
run: |