ci(workflow): fix pnpm cache path context by using step outputs
- Replace env var STORE_PATH with step output\n- Add id to pnpm-store step and write to \n- Reference cache path via steps.pnpm-store.outputs.path\n- Resolves linter warning: Context access might be invalid: STORE_PATH\n- No behavior change; caching remains the same
This commit is contained in:
5
.github/workflows/release.yml
vendored
5
.github/workflows/release.yml
vendored
@@ -37,13 +37,14 @@ jobs:
|
|||||||
run_install: false
|
run_install: false
|
||||||
|
|
||||||
- name: Get pnpm store directory
|
- name: Get pnpm store directory
|
||||||
|
id: pnpm-store
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
run: echo "path=$(pnpm store path --silent)" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Setup pnpm cache
|
- name: Setup pnpm cache
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
with:
|
with:
|
||||||
path: ${{ env.STORE_PATH }}
|
path: ${{ steps.pnpm-store.outputs.path }}
|
||||||
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
restore-keys: ${{ runner.os }}-pnpm-store-
|
restore-keys: ${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user