diff options
| author | Oskar Nyberg <oskar@mullvad.net> | 2023-10-16 18:09:22 +0200 |
|---|---|---|
| committer | Oskar Nyberg <oskar@mullvad.net> | 2023-10-20 13:51:33 +0200 |
| commit | cbac18627ddd524b3e39eca343deeee82dd2bbc8 (patch) | |
| tree | 864c5d064d8a7e23b577bf7a100ca143611b3651 | |
| parent | c993d397b4a75d837b19803092956310e30faae7 (diff) | |
| download | mullvadvpn-cbac18627ddd524b3e39eca343deeee82dd2bbc8.tar.xz mullvadvpn-cbac18627ddd524b3e39eca343deeee82dd2bbc8.zip | |
Replace volta-cli/action with actions/setup-node
| -rw-r--r-- | .github/workflows/frontend.yml | 27 | ||||
| -rw-r--r-- | .github/workflows/translations.yml | 26 |
2 files changed, 28 insertions, 25 deletions
diff --git a/.github/workflows/frontend.yml b/.github/workflows/frontend.yml index 74fd80e7e9..7cae4890e1 100644 --- a/.github/workflows/frontend.yml +++ b/.github/workflows/frontend.yml @@ -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 diff --git a/.github/workflows/translations.yml b/.github/workflows/translations.yml index 2eb424aab4..b7765debe6 100644 --- a/.github/workflows/translations.yml +++ b/.github/workflows/translations.yml @@ -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 |
