updating infrastructure

This commit is contained in:
2025-11-23 10:43:19 -06:00
parent 23b0361718
commit 0ea7e48b90

62
.github/workflows/build.yaml vendored Normal file
View File

@@ -0,0 +1,62 @@
name: 'API Build'
on:
workflow_call:
inputs:
environment_name:
required: true
type: string
version_number:
required: true
type: string
jobs:
build:
runs-on: ubuntu-latest
environment: ${{ inputs.environment_name }}
steps:
- name: Checkout
uses: actions/checkout@v5
with:
sparse-checkout: |
api
- name: Install Nest CLI
run: |
npm install -g @nestjs/cli
- name: 'Setup Node'
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION }}
- name: Install dependencies
run: |
npm ci
- name: Build API
run: |
npm run build -w api
- name: Build Client
run: |
npm run build -w client
- name: Log into Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Setup Docker Buildx
if: ${{ github.event_name != 'pull_request' }}
uses: docker/setup-buildx-action@v3
- name: Build and push to registry
if: ${{ github.event_name != 'pull_request' }}
uses: docker/build-push-action@v6
with:
push: true
tags: noahspan/flying:${{ inputs.version_number }}
context: .
target: api