Skip to content

Commit 61a8cea

Browse files
committed
fix: resolve portal 500 errors and container build failures
- _Host.cshtml: change render-mode ServerPrerendered → Server to prevent AuthorizeView from crashing during SSR prerender phase (no auth state is available before the Blazor circuit is established) - build-containers.yaml: codeql upload-sarif v2 → v3, add security-events:write - docker-build.yml: fix path triggers and build contexts — all portal/services/ site paths were missing the src/ prefix, causing the portal image to never be rebuilt on code changes
1 parent 6674ef4 commit 61a8cea

File tree

3 files changed

+13
-12
lines changed

3 files changed

+13
-12
lines changed

.github/workflows/build-containers.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ jobs:
3535
permissions:
3636
contents: read
3737
packages: write
38+
security-events: write
3839

3940
strategy:
4041
matrix:
@@ -103,7 +104,7 @@ jobs:
103104
if: github.event_name != 'pull_request'
104105

105106
- name: Upload Trivy scan results
106-
uses: github/codeql-action/upload-sarif@v2
107+
uses: github/codeql-action/upload-sarif@v3
107108
with:
108109
sarif_file: 'trivy-results-${{ matrix.container.name }}.sarif'
109110
if: github.event_name != 'pull_request'

.github/workflows/docker-build.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,18 @@ on:
55
branches:
66
- main
77
paths:
8-
- 'services/**'
9-
- 'portal/**'
10-
- 'site/**'
8+
- 'src/services/**'
9+
- 'src/portal/**'
10+
- 'src/site/**'
1111
- 'containers/**'
1212
- '.github/workflows/docker-build.yml'
1313
pull_request:
1414
branches:
1515
- main
1616
paths:
17-
- 'services/**'
18-
- 'portal/**'
19-
- 'site/**'
17+
- 'src/services/**'
18+
- 'src/portal/**'
19+
- 'src/site/**'
2020
- 'containers/**'
2121
workflow_dispatch:
2222

@@ -121,8 +121,8 @@ jobs:
121121
- name: Build and push
122122
uses: docker/build-push-action@v5
123123
with:
124-
context: ./portal/CloudHealthOffice.Portal
125-
file: ./portal/CloudHealthOffice.Portal/Dockerfile
124+
context: ./src/portal/CloudHealthOffice.Portal
125+
file: ./src/portal/CloudHealthOffice.Portal/Dockerfile
126126
push: ${{ github.event_name != 'pull_request' }}
127127
tags: ${{ steps.meta.outputs.tags }}
128128
labels: ${{ steps.meta.outputs.labels }}
@@ -165,8 +165,8 @@ jobs:
165165
- name: Build and push
166166
uses: docker/build-push-action@v5
167167
with:
168-
context: ./site
169-
file: ./site/Dockerfile
168+
context: ./src/site
169+
file: ./src/site/Dockerfile
170170
push: ${{ github.event_name != 'pull_request' }}
171171
tags: ${{ steps.meta.outputs.tags }}
172172
labels: ${{ steps.meta.outputs.labels }}

src/portal/CloudHealthOffice.Portal/Pages/_Host.cshtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<component type="typeof(HeadOutlet)" render-mode="ServerPrerendered" />
1818
</head>
1919
<body>
20-
<component type="typeof(App)" render-mode="ServerPrerendered" />
20+
<component type="typeof(App)" render-mode="Server" />
2121

2222
<div id="blazor-error-ui">
2323
<environment include="Staging,Production">

0 commit comments

Comments
 (0)