diff --git a/.github/actions/install/action.yml b/.github/actions/install/action.yml new file mode 100644 index 000000000..72a73b3e7 --- /dev/null +++ b/.github/actions/install/action.yml @@ -0,0 +1,17 @@ +name: install +description: > + Installs Meteor and NPM dependencies. + +runs: + + using: composite + + steps: + + - name: Install 💾 + id: install + uses: meteor-actions/install@v6 + + - name: Postinstall 🪝 + if: steps.install.outputs.ran-npm-install-hooks != 'true' + run: meteor npm run postinstall diff --git a/.github/workflows/ci:build.yml b/.github/workflows/ci:build.yml index c818ababc..09b984da2 100644 --- a/.github/workflows/ci:build.yml +++ b/.github/workflows/ci:build.yml @@ -34,7 +34,7 @@ jobs: uses: actions/checkout@v4 - name: Install 💾 - uses: meteor-actions/install@v6 + uses: ./.github/actions/install - name: Get Meteor's Node version id: meteor-node diff --git a/.github/workflows/ci:commit-msg.yml b/.github/workflows/ci:commit-msg.yml index a715a858e..9b103a2d3 100644 --- a/.github/workflows/ci:commit-msg.yml +++ b/.github/workflows/ci:commit-msg.yml @@ -24,7 +24,7 @@ jobs: fetch-depth: 0 - name: Install 💾 - uses: meteor-actions/install@v6 + uses: ./.github/actions/install - name: Lint last pushed commit 👕 if: github.event_name == 'push' diff --git a/.github/workflows/ci:lint-config.yml b/.github/workflows/ci:lint-config.yml index bbb329847..eed556ed6 100644 --- a/.github/workflows/ci:lint-config.yml +++ b/.github/workflows/ci:lint-config.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Install 💾 - uses: meteor-actions/install@v6 + uses: ./.github/actions/install - name: Lint config 👕 run: meteor npm run lint-config diff --git a/.github/workflows/ci:lint.yml b/.github/workflows/ci:lint.yml index a528689b8..dd3542490 100644 --- a/.github/workflows/ci:lint.yml +++ b/.github/workflows/ci:lint.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Install 💾 - uses: meteor-actions/install@v6 + uses: ./.github/actions/install - name: Lint 👕 run: meteor npm run lint diff --git a/.github/workflows/ci:test.yml b/.github/workflows/ci:test.yml index e92031f00..c00d7103c 100644 --- a/.github/workflows/ci:test.yml +++ b/.github/workflows/ci:test.yml @@ -31,11 +31,7 @@ jobs: key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install 💾 - uses: meteor-actions/install@v6 - - # TODO Run only when install action hits the cache. - - name: Postinstall - run: meteor npm run postinstall + uses: ./.github/actions/install - name: Cache build 💽 uses: meteor-actions/cache-build@v4 @@ -96,7 +92,7 @@ jobs: key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} - name: Install 💾 - uses: meteor-actions/install@v6 + uses: ./.github/actions/install - name: Cache build 💽 uses: meteor-actions/cache-build@v4 diff --git a/.github/workflows/ci:type-check.yml b/.github/workflows/ci:type-check.yml index f3d5394a8..1cb9d96cb 100644 --- a/.github/workflows/ci:type-check.yml +++ b/.github/workflows/ci:type-check.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Install 💾 - uses: meteor-actions/install@v6 + uses: ./.github/actions/install - name: TypeScript check ☑️ run: meteor npm run tsc