Skip to content

Commit c0130e3

Browse files
authored
Refresh the action cache once a month (#362)
1 parent 92c8c23 commit c0130e3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/test.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,17 @@ jobs:
4040
python-version: ${{ matrix.python-version }}
4141
channels: defaults,pytorch,conda-forge
4242

43+
- name: Get current month
44+
id: date
45+
run: echo "month=$(date +'%Y-%m')" >> $GITHUB_OUTPUT
46+
4347
- name: Cache dependencies
4448
uses: actions/cache@v4
4549
with:
4650
path: |
4751
~/.conda/pkgs
4852
~/.cache/pip
49-
key: ${{ runner.os }}-deps-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}
53+
key: ${{ runner.os }}-deps-${{ matrix.python-version }}-${{ hashFiles('.github/workflows/test.yml', 'requirements.txt') }}-${{ steps.date.outputs.month }}
5054
restore-keys: |
5155
${{ runner.os }}-deps-
5256

0 commit comments

Comments
 (0)