Skip to content

Commit

Permalink
ci: use native cache
Browse files Browse the repository at this point in the history
  • Loading branch information
tamtamchik committed Jul 8, 2024
1 parent 2d45696 commit 824e7a1
Showing 1 changed file with 7 additions and 18 deletions.
25 changes: 7 additions & 18 deletions .github/workflows/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,19 @@ on: workflow_call
runs:
using: "composite"
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc

- name: Enable corepack
shell: bash
run: corepack enable

- name: Cache dependencies
id: yarn-cache
uses: actions/cache@v3
- uses: actions/setup-node@v4
with:
path: |
~/.npm
~/.cache/yarn
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
node-version-file: .nvmrc
cache: yarn

- name: Install dependencies
shell: bash
run: yarn install
if: steps.yarn-cache.outputs.cache-hit != 'true'

- name: Show versions
shell: bash
run: node --version && yarn --version

0 comments on commit 824e7a1

Please sign in to comment.