Skip to content

Commit 87e6c72

Browse files
committed
Update GitHub Actions workflow to include daily cache timestamp for pip dependencies
1 parent 21403f4 commit 87e6c72

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

.github/workflows/test.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,19 @@ jobs:
3434
with:
3535
python-version: "3.11"
3636

37+
- name: Get daily cache timestamp
38+
id: daily-cache
39+
run: |
40+
# Calculate date (e.g., 2024-01-15) for daily cache expiration
41+
DATE_STAMP=$(date +"%Y-%m-%d")
42+
echo "date=$DATE_STAMP" >> $GITHUB_OUTPUT
43+
echo "Using daily cache stamp: $DATE_STAMP"
44+
3745
- name: Cache pip dependencies
3846
uses: actions/cache@v3
3947
with:
4048
path: ~/.cache/pip
41-
key: ${{ runner.os }}-pip-3.11-${{ hashFiles('**/pyproject.toml') }}
49+
key: ${{ runner.os }}-pip-3.11-${{ steps.daily-cache.outputs.date }}
4250
restore-keys: |
4351
${{ runner.os }}-pip-3.11-
4452

0 commit comments

Comments
 (0)