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 0d08960
Showing 1 changed file with 23 additions and 6 deletions.
29 changes: 23 additions & 6 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 Expand Up @@ -385,7 +401,8 @@ jobs:
id: fetchtag_release
with:
source: ${{ github.ref }}
find: "refs/tags/v"
# find: "refs/tags/v"
find: "refs/tags/t"
replace: ""
- name: Download Yakit (Darwin Amd64)
uses: actions/download-artifact@v2
Expand Down

0 comments on commit 0d08960

Please sign in to comment.