Fix pnpm cache: use inline export instead of workflow env block
act_runner v0.3.0 doesn't propagate workflow-level or job-level env: blocks to job containers. Use export in run commands instead. First run warms cache, subsequent runs will show reused packages.
This commit is contained in:
@@ -10,21 +10,24 @@ concurrency:
|
||||
group: ${{ gitea.workflow }}-${{ gitea.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
PNPM_STORE_DIR: /pnpm-store
|
||||
COREPACK_HOME: /pnpm-store/.corepack
|
||||
|
||||
jobs:
|
||||
lint-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- run: corepack enable && corepack prepare pnpm@latest --activate
|
||||
- name: Setup pnpm
|
||||
run: |
|
||||
export COREPACK_HOME=/pnpm-store/.corepack
|
||||
corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PNPM_STORE_DIR=/pnpm-store
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
- run: pnpm turbo lint test
|
||||
- name: Lint and test
|
||||
run: pnpm turbo lint test
|
||||
|
||||
build:
|
||||
needs: [lint-and-test]
|
||||
@@ -34,9 +37,15 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- run: corepack enable && corepack prepare pnpm@latest --activate
|
||||
- name: Setup pnpm
|
||||
run: |
|
||||
export COREPACK_HOME=/pnpm-store/.corepack
|
||||
corepack enable && corepack prepare pnpm@latest --activate
|
||||
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export PNPM_STORE_DIR=/pnpm-store
|
||||
pnpm install --frozen-lockfile
|
||||
|
||||
- name: Detect and build changed apps
|
||||
run: |
|
||||
|
||||
Reference in New Issue
Block a user