Update CI workflow to remove caching for Node.js and Python dependencies and change trigger to workflow_dispatch
This commit is contained in:
@ -1,10 +1,7 @@
|
|||||||
name: CI
|
name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_dispatch:
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -13,24 +10,6 @@ jobs:
|
|||||||
- name: 检出代码
|
- name: 检出代码
|
||||||
uses: ./.actions/checkout
|
uses: ./.actions/checkout
|
||||||
|
|
||||||
# Node.js 缓存
|
|
||||||
- name: 缓存 node_modules
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: platform/node_modules
|
|
||||||
key: node-modules-${{ hashFiles('platform/package-lock.json') }}
|
|
||||||
restore-keys: |
|
|
||||||
node-modules-
|
|
||||||
|
|
||||||
# Python 缓存
|
|
||||||
- name: 缓存 pip
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
path: ~/.cache/pip
|
|
||||||
key: pip-cache-${{ hashFiles('back/requirements.txt') }}
|
|
||||||
restore-keys: |
|
|
||||||
pip-cache-
|
|
||||||
|
|
||||||
- name: 安装 Node.js
|
- name: 安装 Node.js
|
||||||
run: |
|
run: |
|
||||||
curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
|
curl -fsSL https://deb.nodesource.com/setup_21.x | bash -
|
||||||
|
|||||||
Reference in New Issue
Block a user