Skip to content

Commit 098279c

Browse files
⚙️ config(ci): Always run NPM postinstall hook in workflows.
1 parent 3f95e37 commit 098279c

File tree

7 files changed

+24
-11
lines changed

7 files changed

+24
-11
lines changed

.github/actions/install/action.yml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: install
2+
description: >
3+
Installs Meteor and NPM dependencies.
4+
5+
runs:
6+
7+
using: composite
8+
9+
steps:
10+
11+
- name: Install 💾
12+
id: install
13+
uses: meteor-actions/install@v6
14+
15+
- name: Postinstall 🪝
16+
if: steps.install.outputs.ran-npm-install-hooks != 'true'
17+
run: meteor npm run postinstall

.github/workflows/ci:build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
uses: actions/checkout@v4
3535

3636
- name: Install 💾
37-
uses: meteor-actions/install@v6
37+
uses: ./.github/actions/install
3838

3939
- name: Get Meteor's Node version
4040
id: meteor-node

.github/workflows/ci:commit-msg.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fetch-depth: 0
2525

2626
- name: Install 💾
27-
uses: meteor-actions/install@v6
27+
uses: ./.github/actions/install
2828

2929
- name: Lint last pushed commit 👕
3030
if: github.event_name == 'push'

.github/workflows/ci:lint-config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323

2424
- name: Install 💾
25-
uses: meteor-actions/install@v6
25+
uses: ./.github/actions/install
2626

2727
- name: Lint config 👕
2828
run: meteor npm run lint-config

.github/workflows/ci:lint.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323

2424
- name: Install 💾
25-
uses: meteor-actions/install@v6
25+
uses: ./.github/actions/install
2626

2727
- name: Lint 👕
2828
run: meteor npm run lint

.github/workflows/ci:test.yml

+2-6
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,7 @@ jobs:
3131
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
3232

3333
- name: Install 💾
34-
uses: meteor-actions/install@v6
35-
36-
# TODO Run only when install action hits the cache.
37-
- name: Postinstall
38-
run: meteor npm run postinstall
34+
uses: ./.github/actions/install
3935

4036
- name: Cache build 💽
4137
uses: meteor-actions/cache-build@v4
@@ -96,7 +92,7 @@ jobs:
9692
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
9793

9894
- name: Install 💾
99-
uses: meteor-actions/install@v6
95+
uses: ./.github/actions/install
10096

10197
- name: Cache build 💽
10298
uses: meteor-actions/cache-build@v4

.github/workflows/ci:type-check.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
uses: actions/checkout@v4
2323

2424
- name: Install 💾
25-
uses: meteor-actions/install@v6
25+
uses: ./.github/actions/install
2626

2727
- name: TypeScript check ☑️
2828
run: meteor npm run tsc

0 commit comments

Comments
 (0)