Skip to content

Commit

Permalink
Force update the cache weekly using restore-keys
Browse files Browse the repository at this point in the history
  • Loading branch information
IgorTatarnikov committed Nov 26, 2024
1 parent 993a999 commit c485936
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/test_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,14 @@ jobs:
steps:
- uses: neuroinformatics-unit/actions/check_manifest@v2

get-week-number:
runs-on: ubuntu-latest
outputs:
week_number: ${{ steps.get-week-number.outputs.week_number }}
steps:
run:
echo "week_number=$(/bin/date -u "+%V")" >> $GITHUB_OUTPUT

test:
needs: [linting, manifest]
name: ${{ matrix.os }} py${{ matrix.python-version }}
Expand All @@ -43,12 +51,16 @@ jobs:

steps:
- name: Cache atlases
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: | # ensure we don't cache any interrupted atlas download and extraction, if e.g. we cancel the workflow manually
~/.brainglobe
!~/.brainglobe/atlas.tar.gz
key: brainglobe
enableCrossOsArchive: 'true'
key: brainglobe-${{ steps.get-week-number.outputs.week_number }}
restore-keys: |
brainglobe-${{ steps.get-week-number.outputs.week_number }}
brainglobe
- uses: neuroinformatics-unit/actions/test@v2
with:
Expand Down

0 comments on commit c485936

Please sign in to comment.