First commit
Some checks failed
Main / changes (push) Successful in 34s
Main / deploy (push) Has been cancelled
Main / build-and-test (push) Has been cancelled

This commit is contained in:
2026-07-17 12:28:28 -05:00
commit 9d9cdbaebc
183 changed files with 9015 additions and 0 deletions

View File

@@ -0,0 +1,82 @@
name: 'API Build'
on:
workflow_call:
inputs:
environment_name:
required: true
type: string
version_number:
required: true
type: string
jobs:
build-and-test:
runs-on: ubuntu-latest
environment: ${{ inputs.environment_name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
sparse-checkout: |
api
client
- name: Get Secrets from Infisical
uses: Infisical/secrets-action@v1.0.16
with:
domain: ${{ secrets.INFISICAL_DOMAIN }}
client-id: ${{ secrets.INFISICAL_CLIENT_ID }}
client-secret: ${{ secrets.INFISICAL_CLIENT_SECRET }}
project-slug: ${{ secrets.INFISICAL_PROJECT_SLUG }}
env-slug: ${{ inputs.environment_name }}
secret-path: /portfolio
- name: Install Nest CLI
run: |
npm install -g @nestjs/cli
- name: 'Setup Node'
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
- name: Install dependencies
run: |
npm ci
- name: Build API
run: |
npm run build -w api
- name: Test API
run: |
npm run test -w api
- name: Build Client
env:
VITE_API_URL: ${{ env.VITE_API_URL }}
VITE_BASE_URL: ${{ env.VITE_BASE_URL }}
VITE_CLIENT_ID: ${{ env.VITE_CLIENT_ID }}
VITE_ISSUER_URI: ${{ env.VITE_ISSUER_URI }}
VITE_TENANT_ID: ${{ env.VITE_TENANT_ID }}
run: |
npm run build -w client
- name: Log into Docker Hub
if: ${{ github.event_name != 'pull_request' }}
uses: docker/login-action@v3
with:
username: ${{ env.DOCKERHUB_USERNAME }}
password: ${{ env.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: .