Skip to content

Commit 0a2b12a

Browse files
authored
test(deps): install pnpm with npm (#1117)
1 parent f8558e8 commit 0a2b12a

File tree

2 files changed

+7
-19
lines changed

2 files changed

+7
-19
lines changed

.github/workflows/example-basic-pnpm.yml

+5-15
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,7 @@ jobs:
1515
uses: actions/checkout@v4
1616

1717
- name: Install pnpm
18-
uses: pnpm/action-setup@v2
19-
with:
20-
version: 8
18+
run: npm install -g pnpm@8
2119

2220
- name: Get pnpm store directory
2321
shell: bash
@@ -52,9 +50,7 @@ jobs:
5250
uses: actions/checkout@v4
5351

5452
- name: Install pnpm
55-
uses: pnpm/action-setup@v2
56-
with:
57-
version: 8
53+
run: npm install -g pnpm@8
5854

5955
- name: Get pnpm store directory
6056
shell: bash
@@ -82,9 +78,7 @@ jobs:
8278
uses: actions/checkout@v4
8379

8480
- name: Install pnpm
85-
uses: pnpm/action-setup@v2
86-
with:
87-
version: 8
81+
run: npm install -g pnpm@8
8882

8983
- name: Get pnpm store directory
9084
shell: bash
@@ -112,9 +106,7 @@ jobs:
112106
uses: actions/checkout@v4
113107

114108
- name: Install pnpm
115-
uses: pnpm/action-setup@v2
116-
with:
117-
version: 8
109+
run: npm install -g pnpm@8
118110

119111
- name: Get pnpm store directory
120112
shell: bash
@@ -145,9 +137,7 @@ jobs:
145137
uses: actions/checkout@v4
146138

147139
- name: Install pnpm
148-
uses: pnpm/action-setup@v2
149-
with:
150-
version: 8
140+
run: npm install -g pnpm@8
151141

152142
- name: Get pnpm store directory
153143
shell: bash

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -1103,7 +1103,7 @@ jobs:
11031103

11041104
### pnpm
11051105

1106-
The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`): to install `pnpm` include [pnpm/action-setup](https://github.com/pnpm/action-setup) in your workflow. If the action finds a `pnpm-lock.yaml` file, it uses the [pnpm](https://pnpm.io/cli/install) command `pnpm install --frozen-lockfile` by default to install dependencies.
1106+
The package manager `pnpm` is not pre-installed in [GitHub Actions runner images](https://github.com/actions/runner-images) (unlike `npm` and `yarn`) and so it must be installed in a separate workflow step (see below). If the action finds a `pnpm-lock.yaml` file, it uses the [pnpm](https://pnpm.io/cli/install) command `pnpm install --frozen-lockfile` by default to install dependencies.
11071107
At this time the action does not automatically cache dependencies installed by pnpm. The example below includes steps to locate the pnpm store directory and to cache its contents for later use.
11081108

11091109
```yaml
@@ -1116,9 +1116,7 @@ jobs:
11161116
- name: Checkout
11171117
uses: actions/checkout@v4
11181118
- name: Install pnpm
1119-
uses: pnpm/action-setup@v2
1120-
with:
1121-
version: 8
1119+
run: npm install -g pnpm@8
11221120
- name: Get pnpm store directory
11231121
shell: bash
11241122
run: |

0 commit comments

Comments
 (0)