Skip to content

Commit

Permalink
ci cache
Browse files Browse the repository at this point in the history
  • Loading branch information
luoluoTH committed Jul 5, 2024
1 parent e40273b commit 169e3bb
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/yakit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,27 +58,43 @@ jobs:
run: echo ${{ steps.extract_version.outputs.version }}
# Cache node_modules main
- name: Cache node_modules for main process
id: cache-main
uses: actions/cache@v2
with:
path: node_modules
key: ${{ runner.os }}-node-main-${{ hashFiles('yarn.lock') }}
key: ${{ runner.os }}-node-main-${{ hashFiles('package.json') }}
restore-keys: |
${{ runner.os }}-node-main-
# Cache node_modules renderer
- name: Cache node_modules for renderer process
id: cache-renderer
uses: actions/cache@v2
with:
path: app/renderer/src/main/node_modules
key: ${{ runner.os }}-node-renderer-${{ hashFiles('app/renderer/src/main/yarn.lock') }}
key: ${{ runner.os }}-node-renderer-${{ hashFiles('app/renderer/src/main/package.json') }}
restore-keys: |
${{ runner.os }}-node-renderer-
- run: yarn install && yarn install-render
- name: Install dependencies for main process
if: ${{steps.cache-main.outputs.cache-hit}} != 'true'
working-directory: ./
run: yarn install
env:
CI: ""
NODE_OPTIONS: --max_old_space_size=4096
- name: Install dependencies for renderer process
if: ${{steps.cache-renderer.outputs.cache-hit}} != 'true'
working-directory: ./
name: "Install Dependencies"
run: yarn install-render
env:
CI: ""
NODE_OPTIONS: --max_old_space_size=4096
# - run: yarn install && yarn install-render
# if: ${{steps.cache-main.outputs.cache-hit}} != 'true'||${{steps.cache-renderer.outputs.cache-hit}} != 'true'
# working-directory: ./
# name: "Install Dependencies"
# env:
# CI: ""
# NODE_OPTIONS: --max_old_space_size=4096
- run: wget -O bins/database/default-cve.db.gzip https://cve-db.oss-accelerate.aliyuncs.com/default-cve.db.gzip
if: ${{ startsWith(github.ref, 'refs/heads/ci/yakit-') }}
name: "Download CVE(Include CWE) Data (EnpriTrace && EnpriTraceAgent)"
Expand Down

0 comments on commit 169e3bb

Please sign in to comment.