Skip to content

Commit

Permalink
Replace volta-cli/action with actions/setup-node
Browse files Browse the repository at this point in the history
  • Loading branch information
raksooo committed Oct 20, 2023
1 parent c993d39 commit cbac186
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 25 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/frontend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup volta
uses: volta-cli/action@v4

- name: Get npm cache directory path
id: npm-cache-dir-path
shell: bash # To ensure that Windows correctly ouputs the cache path
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Read volta info
id: volta
uses: zoexx/github-action-json-file-properties@release
with:
file_path: 'gui/package.json'
prop_path: 'volta'

- name: Cache npm dependencies
uses: actions/cache@v3
- name: Setup node
uses: actions/setup-node@v3
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
node-version: ${{ steps.volta.outputs.node }}
cache: 'npm'
cache-dependency-path: gui/package-lock.json

- name: Update NPM
run: npm i -g npm@${{ steps.volta.outputs.npm }}

- name: Install dependencies
working-directory: gui
Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,20 +16,22 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup volta
uses: volta-cli/action@v4

- name: Get npm cache directory path
id: npm-cache-dir-path
run: echo "::set-output name=dir::$(npm config get cache)"
- name: Read volta info
id: volta
uses: zoexx/github-action-json-file-properties@release
with:
file_path: 'gui/package.json'
prop_path: 'volta'

- name: Cache npm dependencies
uses: actions/cache@v3
- name: Setup node
uses: actions/setup-node@v3
with:
path: ${{ steps.npm-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
node-version: ${{ steps.volta.outputs.node }}
cache: 'npm'
cache-dependency-path: gui/package-lock.json

- name: Update NPM
run: npm i -g npm@${{ steps.volta.outputs.npm }}

- name: Install JS dependencies
working-directory: gui
Expand Down

0 comments on commit cbac186

Please sign in to comment.