Skip to content

Commit

Permalink
include date in cache key (#359)
Browse files Browse the repository at this point in the history
* include date in cache key for micromamba environment caching
  • Loading branch information
mikemhenry authored Jan 2, 2024
1 parent 75b4e17 commit c95cb38
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/gh-ci-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,19 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"

- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: mda-user-guide
cache-environment: true
cache-downloads: true
cache-environment-key: environment-${{ steps.date.outputs.date }}
cache-downloads-key: downloads-${{ steps.date.outputs.date }}
create-args: >-
hole2
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/gh-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Get current date
id: date
run: echo "date=$(date +%Y-%m-%d)" >> "${GITHUB_OUTPUT}"

- name: setup micromamba
uses: mamba-org/setup-micromamba@v1
with:
environment-file: environment.yml
environment-name: mda-user-guide
cache-environment: true
cache-downloads: true
cache-environment-key: environment-${{ steps.date.outputs.date }}
cache-downloads-key: downloads-${{ steps.date.outputs.date }}


- name: install_deps
run: |
Expand Down

0 comments on commit c95cb38

Please sign in to comment.