Files
reusing_workflows/.github/workflows/build_node.yml
2024-03-04 17:07:58 +08:00

43 lines
906 B
YAML

on:
workflow_call:
inputs:
node-version:
required: true
type: string
dist-dir:
required: false
type: string
default: 'dist'
artifact-name:
required: false
type: string
default: 'artifact'
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 ${{ inputs.dist-dir }} pub
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.artifact-name }}
path: |
pub
docker