Skip to content

Commit b5daaa4

Browse files
Update call-reusable.yml
1 parent 63036fc commit b5daaa4

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

.github/workflows/call-reusable.yml

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: PNPM Cache Example
1+
name: PNPM Cache Example - Force 422
22

33
on:
44
workflow_call:
55

66
jobs:
77
install:
8-
runs-on: ubuntu-latest
8+
runs-on: self-hosted
99

1010
steps:
1111
- uses: actions/checkout@v4
@@ -18,23 +18,23 @@ jobs:
1818
- name: Install PNPM
1919
run: npm install -g pnpm
2020

21-
- name: Get PNPM store path or fallback
22-
id: pnpm-path
21+
- name: Set invalid cache path
22+
id: invalid-path
2323
run: |
24-
PNPM_STORE_PATH=$(pnpm store path 2>/dev/null || echo "/tmp/fake-pnpm-store-path")
25-
echo "store_path=$PNPM_STORE_PATH" >> $GITHUB_OUTPUT
24+
# Setting a path that likely doesn't exist or isn't accessible to cause failure
25+
echo "store_path=/nonexistent/path/for/cache" >> $GITHUB_OUTPUT
2626
27-
- name: Restore PNPM cache
27+
- name: Restore PNPM cache with invalid path
2828
uses: actions/cache@v4
2929
with:
30-
path: ${{ steps.pnpm-path.outputs.store_path }}
31-
key: pnpm-store-${{ runner.os }}-18.20.4-v1
30+
path: ${{ steps.invalid-path.outputs.store_path }}
31+
key: pnpm-store-invalid-key-!@# # invalid characters to simulate error
3232

3333
- name: Install dependencies
34-
run: pnpm install || echo "Skipping install if pnpm not working"
34+
run: pnpm install || echo "pnpm install failed as expected"
3535

36-
- name: Save PNPM cache
36+
- name: Save PNPM cache with invalid path
3737
uses: actions/cache@v4
3838
with:
39-
path: ${{ steps.pnpm-path.outputs.store_path }}
40-
key: pnpm-store-${{ runner.os }}-18.20.4-v1
39+
path: ${{ steps.invalid-path.outputs.store_path }}
40+
key: pnpm-store-invalid-key-!@#

0 commit comments

Comments
 (0)