Skip to content

Commit 2ad42f5

Browse files
committed
fix: Update container publishing configuration for API and Blazor projects
1 parent 8fc8e01 commit 2ad42f5

4 files changed

Lines changed: 11 additions & 17 deletions

File tree

.github/workflows/build-and-push-containers.yml

Lines changed: 6 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -30,29 +30,19 @@ jobs:
3030
password: ${{ secrets.GITHUB_TOKEN }}
3131

3232
- name: Publish API container image
33+
working-directory: ./src/Playground/Playground.Api/Playground.Api.csproj
3334
run: |
34-
dotnet publish src/Playground/Playground.Api/Playground.Api.csproj \
35-
-c Release -r linux-x64 \
36-
-p:PublishProfile=DefaultContainer \
37-
-p:ContainerRegistry=ghcr.io \
38-
-p:ContainerRepository=${{ github.repository_owner }}/fsh-playground-api \
39-
-p:ContainerImageTags='${{ github.sha }};latest'
35+
dotnet publish -c Release -p:RuntimeIdentifier=linux-x64 -p:ContainerRepository=${{ github.repository_owner }}/fsh-playground-api -p:ContainerImageTags='${{ github.sha }};latest'
4036
4137
- name: Publish Blazor container image
38+
working-directory: ./src/Playground/Playground.Blazor/Playground.Blazor.csproj
4239
run: |
43-
dotnet publish src/Playground/Playground.Blazor/Playground.Blazor.csproj \
44-
-c Release -r linux-x64 \
45-
-p:PublishProfile=DefaultContainer \
46-
-p:ContainerRegistry=ghcr.io \
47-
-p:ContainerRepository=${{ github.repository_owner }}/fsh-playground-blazor \
48-
-p:ContainerImageTags='${{ github.sha }};latest'
40+
dotnet publish -c Release -p:RuntimeIdentifier=linux-x64 -p:ContainerRepository=${{ github.repository_owner }}/fsh-playground-blazor -p:ContainerImageTags='${{ github.sha }};latest'
4941
5042
- name: Push API images to GHCR
5143
run: |
52-
docker push ghcr.io/${{ github.repository_owner }}/fsh-playground-api:${{ github.sha }}
53-
docker push ghcr.io/${{ github.repository_owner }}/fsh-playground-api:latest
44+
docker push ghcr.io/${{ github.repository_owner }}/fsh-playground-api --all-tags
5445
5546
- name: Push Blazor images to GHCR
5647
run: |
57-
docker push ghcr.io/${{ github.repository_owner }}/fsh-playground-blazor:${{ github.sha }}
58-
docker push ghcr.io/${{ github.repository_owner }}/fsh-playground-blazor:latest
48+
docker push ghcr.io/${{ github.repository_owner }}/fsh-playground-blazor --all-tags

src/Directory.Build.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<!-- Suppress warning about missing XML docs -->
2222

2323
<!-- Container tags (if using container builds) -->
24-
<ContainerImageTags>3.0.0-alpha;latest</ContainerImageTags>
24+
<ContainerImageTags>10.0.0-rc;latest</ContainerImageTags>
2525

2626
<!-- Prevent MSBuild from excluding common folders (optional) -->
2727
<NoDefaultExcludes>true</NoDefaultExcludes>

src/Playground/Playground.Api/Playground.Api.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<!-- Container configuration -->
88
<ContainerPort>8080</ContainerPort>
99
<ContainerUser>root</ContainerUser>
10+
<ContainerRepository>fsh-playground-api</ContainerRepository>
11+
<PublishProfile>DefaultContainer</PublishProfile>
1012
</PropertyGroup>
1113

1214
<ItemGroup>

src/Playground/Playground.Blazor/Playground.Blazor.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
<!-- Container configuration -->
88
<ContainerPort>8080</ContainerPort>
99
<ContainerUser>root</ContainerUser>
10+
<ContainerRepository>fsh-playground-blazor</ContainerRepository>
11+
<PublishProfile>DefaultContainer</PublishProfile>
1012
</PropertyGroup>
1113

1214
<ItemGroup>

0 commit comments

Comments
 (0)