From d59a05f806635ae5944345adff7040dff5635ec7 Mon Sep 17 00:00:00 2001 From: BugKing Date: Thu, 3 Dec 2020 15:12:28 +0800 Subject: [PATCH] =?UTF-8?q?build:=20GitHub=20action=20=E4=BD=BF=E7=94=A8?= =?UTF-8?q?=E7=BC=93=E5=AD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-push.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml index 0220027a94..d279e2e0c7 100644 --- a/.github/workflows/build-push.yml +++ b/.github/workflows/build-push.yml @@ -10,6 +10,33 @@ jobs: steps: - uses: actions/checkout@v2 - uses: nelonoel/branch-name@v1.0.1 + + - name: Cache node modules + uses: actions/cache@v2 + env: + cache-name: cache-node-modules + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.npm + key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + + - name: Cache maven dependencies + uses: actions/cache@v2 + env: + cache-name: cache-maven-deps + with: + # npm cache files are stored in `~/.npm` on Linux/macOS + path: ~/.m2 + key: ${{ runner.os }}-build-${{ env.cache-name }} + restore-keys: | + ${{ runner.os }}-build-${{ env.cache-name }}- + ${{ runner.os }}-build- + ${{ runner.os }}- + - name: Set up JDK 1.8 uses: actions/setup-java@v1 with: