Skip to content

Commit 908cbf7

Browse files
committed
fix: Replace dynamic env.cache_id with github.run_id in workflow caches
- Eliminates 'Context access might be invalid: cache_id' warnings - Uses built-in GitHub Actions context for better reliability - Simplifies workflow by removing dynamic environment variable step
1 parent 562a33b commit 908cbf7

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

.github/workflows/publish-docs-manually.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,9 @@ jobs:
2121
enable-cache: true
2222
version: 0.7.2
2323

24-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
2524
- uses: actions/cache@v4
2625
with:
27-
key: mkdocs-material-${{ env.cache_id }}
26+
key: mkdocs-material-${{ github.run_id }}
2827
path: .cache
2928
restore-keys: |
3029
mkdocs-material-

.github/workflows/publish-pypi.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,9 @@ jobs:
7070
enable-cache: true
7171
version: 0.7.2
7272

73-
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
7473
- uses: actions/cache@v4
7574
with:
76-
key: mkdocs-material-${{ env.cache_id }}
75+
key: mkdocs-material-${{ github.run_id }}
7776
path: .cache
7877
restore-keys: |
7978
mkdocs-material-

0 commit comments

Comments
 (0)