Add .gitea/workflows/build.yml

This commit is contained in:
2026-04-07 07:52:51 +00:00
parent e9858cbb5d
commit 0603b4f374

View File

@@ -0,0 +1,38 @@
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: 18
- 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
echo "Running custom build command"
${{ inputs.build_command }}
else
npm install
npm run build || true
fi