This commit is contained in:
smf
2024-03-02 18:18:26 +08:00
commit 9a1f411a34
2 changed files with 106 additions and 0 deletions

37
.github/workflows/build_node.yml vendored Normal file
View File

@@ -0,0 +1,37 @@
on:
workflow_call:
inputs:
node-version:
required: true
type: string
artifact-name:
required: true
type: string
jobs:
build_node_project:
runs-on: ubuntu_act_on_20
# container:
# image: catthehacker/ubuntu:act-latest
env:
RUNNER_TOOL_CACHE: /toolcache
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run build
- run: mv dist pub
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: |
pub
docker