Skip to content

Commit d5c7efd

Browse files
authored
ci: fix node version cache file name (#7542)
1 parent b687bf9 commit d5c7efd

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

.github/actions/node/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ runs:
3232
- uses: actions/cache@cdf6c1fa76f9f475f3d7449005a359c84ca0f306 # v5.0.3
3333
id: node-version-cache
3434
with:
35-
path: /tmp/.node-resolved-version
35+
path: /tmp/.node-resolved-version-${{ steps.node-version.outputs.version }}
3636
key: node-resolved-${{ runner.os }}-${{ runner.arch }}-v${{ steps.node-version.outputs.version }}-${{ steps.cache-key.outputs.block }}
3737
restore-keys: node-resolved-${{ runner.os }}-${{ runner.arch }}-v${{ steps.node-version.outputs.version }}-
3838
- name: Read cached version
3939
id: cached
4040
shell: bash
4141
run: |
42-
if [ -f /tmp/.node-resolved-version ]; then
43-
echo "version=$(cat /tmp/.node-resolved-version)" >> "$GITHUB_OUTPUT"
42+
if [ -f /tmp/.node-resolved-version-${{ steps.node-version.outputs.version }} ]; then
43+
echo "version=$(cat /tmp/.node-resolved-version-${{ steps.node-version.outputs.version }})" >> "$GITHUB_OUTPUT"
4444
fi
4545
4646
- uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0
@@ -55,7 +55,7 @@ runs:
5555
- name: Save resolved version
5656
if: steps.node-version-cache.outputs.cache-hit != 'true'
5757
shell: bash
58-
run: node -v | tr -d 'v' > /tmp/.node-resolved-version
58+
run: node -v | tr -d 'v' > /tmp/.node-resolved-version-${{ steps.node-version.outputs.version }}
5959
# Avoid GitHub REST API tag lookups (api.github.com/.../git/refs/tags) which can hit installation rate limits
6060
# in large orgs / high-parallelism workflows. Instead, use a direct release asset URL.
6161
#

0 commit comments

Comments
 (0)