1
- name : Reproduce Cache 422 Error
1
+ name : PNPM Cache 422 Repro
2
2
3
3
on :
4
4
workflow_call :
5
5
6
6
jobs :
7
- cache -422-repro :
8
- runs-on : ubuntu-latest
7
+ repro -422 :
8
+ runs-on : self-hosted
9
9
10
10
steps :
11
11
- uses : actions/checkout@v4
@@ -18,23 +18,34 @@ jobs:
18
18
- name : Install PNPM
19
19
run : npm install -g pnpm
20
20
21
+ - name : Show PNPM store path A
22
+ id : cache-path-A
23
+ run : |
24
+ mkdir -p /tmp/pnpm-store-A
25
+ echo "dummy content A" > /tmp/pnpm-store-A/cache.txt
26
+ echo "STORE_PATH=/tmp/pnpm-store-A" >> $GITHUB_ENV
27
+
21
28
- name : Restore PNPM cache (Path A)
22
29
uses : actions/cache@v4
23
30
with :
24
- path : /tmp/pnpm-store-path-A
31
+ path : ${{ env.STORE_PATH }}
25
32
key : pnpm-store-Linux-18.20.4-v1
26
33
27
- - name : Show restored files
28
- run : ls -la /tmp/pnpm-store-path-A || echo "No cache restored"
34
+ - name : Save PNPM cache (Path A)
35
+ uses : actions/cache@v4
36
+ with :
37
+ path : ${{ env.STORE_PATH }}
38
+ key : pnpm-store-Linux-18.20.4-v1
29
39
30
- - name : Prepare different cache content in Path B
40
+ - name : Show PNPM store path B
41
+ id : cache-path-B
31
42
run : |
32
- mkdir -p /tmp/pnpm-store-path- B
33
- echo "different dummy cache content" > /tmp/pnpm-store-path -B/cache.txt
34
- ls -la /tmp/pnpm-store-path-B
43
+ mkdir -p /tmp/pnpm-store-B
44
+ echo "dummy content B " > /tmp/pnpm-store-B/cache.txt
45
+ echo "STORE_PATH= /tmp/pnpm-store-B" >> $GITHUB_ENV
35
46
36
- - name : Save PNPM cache (Path B)
47
+ - name : Save PNPM cache (Path B) - conflict expected
37
48
uses : actions/cache@v4
38
49
with :
39
- path : /tmp/pnpm-store-path-B
50
+ path : ${{ env.STORE_PATH }}
40
51
key : pnpm-store-Linux-18.20.4-v1
0 commit comments