You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opendal.apache.org by xu...@apache.org on 2023/05/30 04:57:04 UTC

[incubator-opendal] 01/01: ci: Adopt setup-node's cache logic instead

This is an automated email from the ASF dual-hosted git repository.

xuanwo pushed a commit to branch try-address-yarn-cache
in repository https://gitbox.apache.org/repos/asf/incubator-opendal.git

commit e4df05e7b6f06896adcd659afd869eabe85e05cb
Author: Xuanwo <gi...@xuanwo.io>
AuthorDate: Tue May 30 12:56:41 2023 +0800

    ci: Adopt setup-node's cache logic instead
    
    Signed-off-by: Xuanwo <gi...@xuanwo.io>
---
 .github/workflows/bindings_nodejs.yml |  2 +-
 .github/workflows/docs.yml            | 20 +++++++++-----------
 2 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/bindings_nodejs.yml b/.github/workflows/bindings_nodejs.yml
index ce8d78d8..b25d4661 100644
--- a/.github/workflows/bindings_nodejs.yml
+++ b/.github/workflows/bindings_nodejs.yml
@@ -213,7 +213,7 @@ jobs:
       - name: Setup node
         uses: actions/setup-node@v3
         with:
-          node-version: ${{ matrix.node }}
+          node-version: "18"
           cache: yarn
           cache-dependency-path: "bindings/nodejs/yarn.lock"
       - name: Corepack
diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml
index 2db279c5..0dfe67d3 100644
--- a/.github/workflows/docs.yml
+++ b/.github/workflows/docs.yml
@@ -88,6 +88,12 @@ jobs:
     steps:
       - uses: actions/checkout@v3
 
+      - uses: actions/setup-node@v3
+        with:
+          node-version: '18'
+          cache: yarn
+          cache-dependency-path: "bindings/nodejs/yarn.lock"
+
       - name: Install dependencies
         working-directory: bindings/nodejs
         run: yarn install
@@ -142,21 +148,13 @@ jobs:
 
       - uses: actions/setup-node@v3
         with:
-          node-version: '16'
+          node-version: '18'
+          cache: yarn
+          cache-dependency-path: "website/yarn.lock"
 
       - run: corepack enable
         working-directory: bindings/nodejs
 
-      - name: Get yarn cache directory path
-        id: yarn-cache-dir-path
-        run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
-
-      - uses: actions/cache@v3
-        id: yarn-cache
-        with:
-          path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
-          key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
-
       - name: Download rust docs
         uses: actions/download-artifact@v3
         with: