From 6816b0a582fa7738fc55904ce71eb7c7acd4045e Mon Sep 17 00:00:00 2001 From: kalwalt Date: Wed, 9 Mar 2022 20:37:27 +0100 Subject: [PATCH] cache to main script --- .github/workflows/main.yml | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index edddaa8e..5f43845e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,16 @@ jobs: node-version: [14.x] steps: - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node- - name: Set output id: vars run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} @@ -30,10 +40,6 @@ jobs: path: | build !build/libar.bc - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v1 - with: - node-version: ${{ matrix.node-version }} - run: git submodule update --init - run: npm install - run: docker run -dit --name emscripten -v $(pwd):/src emscripten/emsdk:3.1.6 bash