From 4369bfc43d631cbe6a5f338f57224034f1e59f87 Mon Sep 17 00:00:00 2001 From: ychung-mot Date: Wed, 17 Apr 2024 08:13:55 -0700 Subject: [PATCH] chore: Github Actions to use Node.js 20 --- .github/actions/setup-npm/action.yml | 30 ++++++++++------- .github/actions/setup-tools/action.yml | 46 +++++++++++++++----------- 2 files changed, 44 insertions(+), 32 deletions(-) diff --git a/.github/actions/setup-npm/action.yml b/.github/actions/setup-npm/action.yml index 7f2e70b9..532fd75e 100644 --- a/.github/actions/setup-npm/action.yml +++ b/.github/actions/setup-npm/action.yml @@ -4,17 +4,23 @@ description: Setup required NPM packages runs: using: composite steps: - - uses: actions/cache@67b839edb68371cc5014f6cea11c9aa77238de78 - with: - path: | - **/node_modules - key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.lock') }} + - uses: actions/cache@v3 + with: + path: | + **/node_modules + key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.lock') }} + restore-keys: | + ${{ runner.os }}-npm- - - name: Install Root NPM packages - run: npm install - shell: bash + - uses: actions/setup-node@v3 + with: + node-version: '20' - - name: Install Frontend NPM packages - run: npm install - working-directory: ./frontend - shell: bash + - name: Install Root NPM packages + run: npm install + shell: bash + + - name: Install Frontend NPM packages + run: npm install + working-directory: ./frontend + shell: bash diff --git a/.github/actions/setup-tools/action.yml b/.github/actions/setup-tools/action.yml index f9ca9087..e51a7450 100644 --- a/.github/actions/setup-tools/action.yml +++ b/.github/actions/setup-tools/action.yml @@ -4,26 +4,32 @@ description: Setup required tools in the workspace runs: using: composite steps: - - name: Install asdf - uses: asdf-vm/actions/setup@8b8467c5522bb0aea4977082037e4f2956d67e52 + - name: Install asdf + uses: asdf-vm/actions/setup@8b8467c5522bb0aea4977082037e4f2956d67e52 - - name: Cache tools - uses: actions/cache@67b839edb68371cc5014f6cea11c9aa77238de78 - with: - path: /home/runner/.asdf - key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }} + - uses: actions/setup-node@v3 + with: + node-version: '20' - - name: Install required tools - run: | - cat .tool-versions | cut -f 1 -d ' ' | xargs -n 1 asdf plugin-add || true - asdf plugin-add docker-compose https://github.com/virtualstaticvoid/asdf-docker-compose.git || true - asdf plugin-update --all - asdf install - asdf reshim - shell: bash + - name: Cache tools + uses: actions/cache@v3 + with: + path: /home/runner/.asdf + key: ${{ runner.os }}-${{ hashFiles('**/.tool-versions') }} + restore-keys: | + ${{ runner.os }}- - # - name: Install python tools - # run: | - # pip install -r requirements.txt - # asdf reshim - # shell: bash + - name: Install required tools + run: | + cat .tool-versions | cut -f 1 -d ' ' | xargs -n 1 asdf plugin-add || true + asdf plugin-add docker-compose https://github.com/virtualstaticvoid/asdf-docker-compose.git || true + asdf plugin-update --all + asdf install + asdf reshim + shell: bash + + # - name: Install python tools + # run: | + # pip install -r requirements.txt + # asdf reshim + # shell: bash