38 lines
774 B
YAML
38 lines
774 B
YAML
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
|