Skip to content

Commit

Permalink
Fix GitHub Actions mamba caching
Browse files Browse the repository at this point in the history
  • Loading branch information
erikmannerfelt committed Apr 18, 2023
1 parent c7fbe91 commit c773330
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:

- name: Get month for resetting cache
id: get-date
run: echo "::set-output name=month::$(/bin/date -u '+%Y%m')"
run: echo "cache_date=$(/bin/date -u '+%Y%m')" >> $GITHUB_ENV
shell: bash

- name: Cache conda env
uses: actions/cache@v3
with:
path: ${{ env.CONDA }}/envs
key: conda-${{ matrix.os }}-${{ matrix.python-version }}-${{ steps.get-date.outputs.month }}-${{ hashFiles('dev-environment.yml') }}-${{ env.CACHE_NUMBER }}
key: conda-${{ matrix.os }}-${{ matrix.python-version }}-${{ env.cache_date }}-${{ hashFiles('dev-environment.yml') }}-${{ env.CACHE_NUMBER }}
env:
CACHE_NUMBER: 0 # Increase this value to reset cache if environment.yml has not changed
id: cache
Expand Down

0 comments on commit c773330

Please sign in to comment.