Skip to content

Commit c95cb38

Browse files
authored
include date in cache key (#359)
* include date in cache key for micromamba environment caching
1 parent 75b4e17 commit c95cb38

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/workflows/gh-ci-tests.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,19 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v3
3131

32+
- name: Get current date
33+
id: date
34+
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
35+
3236
- name: setup micromamba
3337
uses: mamba-org/setup-micromamba@v1
3438
with:
3539
environment-file: environment.yml
3640
environment-name: mda-user-guide
3741
cache-environment: true
42+
cache-downloads: true
43+
cache-environment-key: environment-${{ steps.date.outputs.date }}
44+
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
3845
create-args: >-
3946
hole2
4047

.github/workflows/gh-ci.yaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,20 @@ jobs:
3737
steps:
3838
- uses: actions/checkout@v3
3939

40+
- name: Get current date
41+
id: date
42+
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"
43+
4044
- name: setup micromamba
4145
uses: mamba-org/setup-micromamba@v1
4246
with:
4347
environment-file: environment.yml
4448
environment-name: mda-user-guide
49+
cache-environment: true
50+
cache-downloads: true
51+
cache-environment-key: environment-${{ steps.date.outputs.date }}
52+
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
53+
4554

4655
- name: install_deps
4756
run: |

0 commit comments

Comments
 (0)