96 switch from azure table storage to sqlite #98

Merged
noahspannbauer merged 11 commits from 96-switch-from-azure-table-storage-to-sqlite into main 2025-11-23 11:51:01 -05:00
5 changed files with 76 additions and 21 deletions

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

View File

@@ -4,8 +4,8 @@ on:
outputs: outputs:
api: api:
value: ${{ jobs.changes.outputs.api }} value: ${{ jobs.changes.outputs.api }}
app: client:
value: ${{ jobs.changes.outputs.app }} value: ${{ jobs.changes.outputs.client }}
jobs: jobs:
changes: changes:
@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
outputs: outputs:
api: ${{ steps.filter.outputs.api }} api: ${{ steps.filter.outputs.api }}
app: ${{ steps.filter.outputs.app }} client: ${{ steps.filter.outputs.client }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -24,5 +24,5 @@ jobs:
filters: | filters: |
api: api:
- 'api/**' - 'api/**'
app: client:
- 'app/**' - 'client/**'

View File

@@ -9,7 +9,7 @@ jobs:
uses: ./.github/workflows/changes.yaml uses: ./.github/workflows/changes.yaml
build: build:
if: ${{ needs.changes.outputs.app == 'true' }} if: ${{ needs.changes.outputs.app == 'true' || needs.changes.outputs.client == 'true' }}
name: build name: build
needs: needs:
- changes - changes

View File

@@ -7,23 +7,12 @@ jobs:
changes: changes:
uses: ./.github/workflows/changes.yaml uses: ./.github/workflows/changes.yaml
build-api: build:
if: ${{ needs.changes.outputs.api == 'true' }} if: ${{ needs.changes.outputs.app == 'true' || needs.changes.outputs.client == 'true'}}
name: build-api name: build
needs: needs:
- changes - changes
uses: ./.github/workflows/api_build.yaml uses: ./.github/workflows/build.yaml
with:
environment_name: pull_request
version_number: ${{ github.run_id }}
secrets: inherit
build-app:
if: ${{ needs.changes.outputs.app == 'true' }}
name: build-app
needs:
- changes
uses: ./.github/workflows/app_build.yaml
with: with:
environment_name: pull_request environment_name: pull_request
version_number: ${{ github.run_id }} version_number: ${{ github.run_id }}

View File

@@ -0,0 +1,4 @@
dbs:
- path: /var/lib/data/flying.db
replicas:
- path: /mnt/backup/flying.db