Compare commits
8 Commits
v2.1.5
...
126-all-lo
| Author | SHA1 | Date | |
|---|---|---|---|
| 075508413e | |||
| 56b07d64a9 | |||
| 928a4dae43 | |||
| e345898341 | |||
| a6af3c2229 | |||
| b8f708fd6d | |||
| 1c46f58afc | |||
| fa7a39e48a |
@@ -1,34 +0,0 @@
|
||||
name: Deploy
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
app_name:
|
||||
required: true
|
||||
type: string
|
||||
environment_name:
|
||||
required: true
|
||||
type: string
|
||||
version_number:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ inputs.environment_name }}
|
||||
steps:
|
||||
- name: Install Azure CLI
|
||||
run: |
|
||||
curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
|
||||
|
||||
- name: Log in to Azure
|
||||
run: |
|
||||
az login --service-principal --username ${{ vars.AZURE_CLIENT_ID }} --password ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ vars.AZURE_TENANT_ID }}
|
||||
|
||||
- name: Update Container App
|
||||
run: |
|
||||
az containerapp update --name ${{ inputs.app_name }}-${{ inputs.environment_name }} --container-name ${{ inputs.app_name }} --resource-group ${{ vars.RESOURCE_GROUP }} --image docker.io/noahspan/${{ inputs.app_name }}:${{ inputs.version_number }}
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
environment: ${{ inputs.environment_name }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
uses: actions/checkout@v5
|
||||
with:
|
||||
sparse-checkout: |
|
||||
api
|
||||
@@ -45,8 +45,8 @@ jobs:
|
||||
- name: Build Client
|
||||
env:
|
||||
VITE_API_URL: ${{ vars.VITE_API_URL }}
|
||||
VITE_BASE_URL: ${{ inputs.environment_name == 'test' && vars.VITE_BASE_URL_TEST || vars.VITE_BASE_URL_PROD }}
|
||||
VITE_CLIENT_ID: ${{ inputs.environment_name == 'test' && vars.VITE_CLIENT_ID_TEST || vars.VITE_CLIENT_ID_PROD }}
|
||||
VITE_BASE_URL: ${{ vars.VITE_BASE_URL }}
|
||||
VITE_CLIENT_ID: ${{ vars.VITE_CLIENT_ID }}
|
||||
VITE_ISSUER_URI: ${{ vars.VITE_ISSUER_URI }}
|
||||
VITE_TENANT_ID: ${{ vars.VITE_TENANT_ID }}
|
||||
run: |
|
||||
@@ -7,9 +7,6 @@ on:
|
||||
client:
|
||||
value: ${{ jobs.changes.outputs.client }}
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
name: filter
|
||||
@@ -18,13 +15,7 @@ jobs:
|
||||
api: ${{ steps.filter.outputs.api }}
|
||||
client: ${{ steps.filter.outputs.client }}
|
||||
steps:
|
||||
- name: 'Setup Node'
|
||||
uses: actions/setup-node@v6
|
||||
with:
|
||||
node-version: '22.x'
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: dorny/paths-filter@v3
|
||||
id: filter
|
||||
35
.github/workflows/deploy.yaml
vendored
Normal file
35
.github/workflows/deploy.yaml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Deploy
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
app_name:
|
||||
required: true
|
||||
type: string
|
||||
environment_name:
|
||||
required: true
|
||||
type: string
|
||||
version_number:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
contents: read
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
environment: ${{ inputs.environment_name }}
|
||||
steps:
|
||||
- name: Log in to Azure
|
||||
uses: azure/login@v2
|
||||
with:
|
||||
client-id: ${{ vars.AZURE_CLIENT_ID }}
|
||||
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
|
||||
tenant-id: ${{ vars.AZURE_TENANT_ID }}
|
||||
|
||||
- name: Azure CLI script
|
||||
uses: azure/cli@v2
|
||||
with:
|
||||
azcliversion: latest
|
||||
inlineScript: |
|
||||
az containerapp update --name ${{ inputs.app_name }}-${{ inputs.environment_name }} --container-name ${{ inputs.app_name }} --resource-group noahspan --image docker.io/noahspan/${{ inputs.app_name }}:${{ inputs.version_number }}
|
||||
@@ -6,14 +6,14 @@ on:
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
uses: ./.gitea/workflows/changes.yaml
|
||||
uses: ./.github/workflows/changes.yaml
|
||||
|
||||
build-and-test:
|
||||
build:
|
||||
if: ${{ needs.changes.outputs.api == 'true' || needs.changes.outputs.client == 'true' }}
|
||||
name: build-and-test
|
||||
name: build
|
||||
needs:
|
||||
- changes
|
||||
uses: ./.gitea/workflows/build_and_test.yaml
|
||||
uses: ./.github/workflows/build_and_test.yaml
|
||||
with:
|
||||
environment_name: test
|
||||
version_number: ${{ github.run_id }}
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
needs:
|
||||
- changes
|
||||
- build
|
||||
uses: ./.gitea/workflows/deploy.yaml
|
||||
uses: ./.github/workflows/deploy.yaml
|
||||
with:
|
||||
app_name: flying
|
||||
environment_name: test
|
||||
@@ -5,14 +5,14 @@ on:
|
||||
|
||||
jobs:
|
||||
changes:
|
||||
uses: ./.gitea/workflows/changes.yaml
|
||||
uses: ./.github/workflows/changes.yaml
|
||||
|
||||
build:
|
||||
if: ${{ needs.changes.outputs.api == 'true' || needs.changes.outputs.client == 'true'}}
|
||||
name: build-and-test
|
||||
if: ${{ needs.changes.outputs.app == 'true' || needs.changes.outputs.client == 'true'}}
|
||||
name: build
|
||||
needs:
|
||||
- changes
|
||||
uses: ./.gitea/workflows/build_and_test.yaml
|
||||
uses: ./.github/workflows/build_and_test.yaml
|
||||
with:
|
||||
environment_name: pull_request
|
||||
version_number: ${{ github.run_id }}
|
||||
@@ -7,7 +7,7 @@ on:
|
||||
jobs:
|
||||
build:
|
||||
name: build
|
||||
uses: ./.gitea/workflows/build_and_test.yaml
|
||||
uses: ./.github/workflows/build_and_test.yaml
|
||||
with:
|
||||
environment_name: prod
|
||||
version_number: ${{ github.ref_name }}
|
||||
@@ -17,7 +17,7 @@ jobs:
|
||||
name: deploy
|
||||
needs:
|
||||
- build
|
||||
uses: ./.gitea/workflows/deploy.yaml
|
||||
uses: ./.github/workflows/deploy.yaml
|
||||
with:
|
||||
app_name: flying
|
||||
environment_name: prod
|
||||
@@ -1,4 +1,3 @@
|
||||
# Flying API
|
||||
|
||||
An API for the Flying app.
|
||||
...
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "api",
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.3",
|
||||
"description": "",
|
||||
"author": "",
|
||||
"private": true,
|
||||
|
||||
@@ -40,7 +40,7 @@ export class LogInterceptor implements NestInterceptor {
|
||||
|
||||
if (jwtPayload[rolesKeyName].includes('Flying.Read')) {
|
||||
if (data.entities) {
|
||||
const logs = data.entities.map((entity) => limitData(entity));
|
||||
const logs = data.entities.map((entity) => limitData(data.entities));
|
||||
|
||||
return {
|
||||
entities: logs,
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
...
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "client",
|
||||
"private": true,
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.3",
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
|
||||
@@ -13,7 +13,6 @@ export default defineConfig({
|
||||
strictPort: true
|
||||
},
|
||||
server: {
|
||||
host: true,
|
||||
port: 8080,
|
||||
proxy: {
|
||||
'/api': {
|
||||
|
||||
1
infrastructure/.gitignore
vendored
1
infrastructure/.gitignore
vendored
@@ -2,4 +2,3 @@
|
||||
.terraform/*
|
||||
*.tfstate
|
||||
*.tfstate.*
|
||||
.DS_Store
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@noahspan/flying",
|
||||
"version": "2.1.5",
|
||||
"version": "2.1.3",
|
||||
"scripts": {
|
||||
"start": "node api/dist/main",
|
||||
"format": "prettier --write \"**/src/**/*.ts\" \"**/test/**/*.ts\"",
|
||||
|
||||
Reference in New Issue
Block a user