Files
wdipl-actions/.gitea/workflows/build.yml

40 lines
971 B
YAML

name: Build
on:
workflow_call:
inputs:
tech_stack:
type: string
required: true
build_command:
type: string
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
# 🟢 NODE / REACT / NESTJS
- name: Setup Node
if: inputs.tech_stack == 'node' || inputs.tech_stack == 'react' || inputs.tech_stack == 'nestjs'
uses: actions/setup-node@v3
with:
node-version: 20
- name: Build (Node / React / NestJS)
if: inputs.tech_stack == 'node' || inputs.tech_stack == 'react' || inputs.tech_stack == 'nestjs'
run: |
if [ -n "${{ inputs.build_command }}" ]; then
set -xe
echo "Running custom build command"
${{ inputs.build_command }}
else
set -xe
npm install
npm run build
fi