diff --git a/.github/workflows/changes.yaml b/.github/workflows/changes.yaml new file mode 100644 index 0000000..917786e --- /dev/null +++ b/.github/workflows/changes.yaml @@ -0,0 +1,28 @@ +name: Changes +on: + workflow_call: + outputs: + api: + value: ${{ jobs.changes.outputs.api }} + app: + value: ${{ jobs.changes.outputs.app }} + +jobs: + changes: + name: filter + runs-on: ubuntu-latest + outputs: + api: ${{ steps.filter.outputs.api }} + app: ${{ steps.filter.outputs.app }} + steps: + - uses: actions/checkout@v3 + + - uses: dorny/paths-filter@v3 + id: filter + with: + initial-fetch-depth: 2 + filters: | + api: + - 'api/**' + app: + - 'app/**' \ No newline at end of file diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 0b813d9..b40eb2a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -5,8 +5,14 @@ on: - main jobs: + changes: + uses: ./.github/workflows/changes.yaml + build-api: + if: ${{ needs.changes.outputs.api == 'true' }} name: build-api + needs: + - changes uses: ./.github/workflows/api_build.yaml with: environment_name: test @@ -15,7 +21,9 @@ jobs: deploy-api: name: deploy-api - needs: build-api + needs: + - changes + - build-api uses: ./.github/workflows/deploy.yaml with: app_name: flying-app @@ -24,7 +32,10 @@ jobs: secrets: inherit build-app: + if: ${{ needs.changes.outputs.app == 'true' }} name: build-app + needs: + - changes uses: ./.github/workflows/app_build.yaml with: environment_name: test @@ -33,7 +44,9 @@ jobs: deploy-app: name: deploy-app - needs: build-app + needs: + - changes + - build-app uses: ./.github/workflows/deploy.yaml with: app_name: flying-app diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml index 20549c0..3de7e68 100644 --- a/.github/workflows/pull_request.yaml +++ b/.github/workflows/pull_request.yaml @@ -4,8 +4,14 @@ on: pull_request: jobs: + changes: + uses: ./.github/workflows/changes.yaml + build-api: + if: ${{ needs.changes.outputs.api == 'true' }} name: build-api + needs: + - changes uses: ./.github/workflows/api_build.yaml with: environment_name: pull_request @@ -13,7 +19,10 @@ jobs: secrets: inherit build-app: + if: ${{ needs.changes.outputs.app == 'true' }} name: build-app + needs: + - changes uses: ./.github/workflows/app_build.yaml with: environment_name: pull_request diff --git a/api/src/auth/auth.strategy.ts b/api/src/auth/auth.strategy.ts index 05d86b0..cd521a4 100644 --- a/api/src/auth/auth.strategy.ts +++ b/api/src/auth/auth.strategy.ts @@ -10,7 +10,6 @@ export class AzureAdStrategy extends PassportStrategy( 'azure-ad' ) { constructor(@Inject(MODULE_OPTIONS_TOKEN) authModuleOptions: AuthModuleOptions) { - console.log(authModuleOptions) super({ identityMetadata: `https://login.microsoftonline.com/${authModuleOptions.tenantId}/.well-known/openid-configuration`, clientID: authModuleOptions.clientId, diff --git a/app/src/components/logForm/LogForm.tsx b/app/src/components/logForm/LogForm.tsx index 4253c1c..00b0b79 100644 --- a/app/src/components/logForm/LogForm.tsx +++ b/app/src/components/logForm/LogForm.tsx @@ -118,7 +118,7 @@ const LogForm: React.FC = ({ ? { headers: { Authorization: await getAccessToken() } } : {}; const response: AxiosResponse = await httpClient.get( - `api/logs/${entryId}`, + `api/logs/log/${entryId}`, config ); const entry = response.data; diff --git a/app/src/components/siteNav/SiteNav.tsx b/app/src/components/siteNav/SiteNav.tsx index d6f51c7..6830110 100644 --- a/app/src/components/siteNav/SiteNav.tsx +++ b/app/src/components/siteNav/SiteNav.tsx @@ -67,7 +67,6 @@ const SiteNav: React.FC = () => { } }; const getUserPhoto = async (accessToken: string): Promise => { - console.log(accessToken) try { const response: AxiosResponse = await httpClient.get(`api/userPhoto`, { headers: {