ci: publish only the web application container
All checks were successful
Caddy Manager CI build / docker (push) Successful in 2m45s
All checks were successful
Caddy Manager CI build / docker (push) Successful in 2m45s
Disable container support for tests and bump the application version to 1.2.1.
This commit is contained in:
6
.github/workflows/ci.yaml
vendored
6
.github/workflows/ci.yaml
vendored
@@ -30,7 +30,9 @@ jobs:
|
||||
cache: true
|
||||
cache-dependency-path: '**/packages.lock.json'
|
||||
- name: Restore dependencies
|
||||
run: dotnet restore --locked-mode
|
||||
# Scoped to the web app so the test project is never restored or built here; it pulls in
|
||||
# Contracts and Services through its project references. Tests run locally, not in this job.
|
||||
run: dotnet restore CaddyManager/CaddyManager.csproj --locked-mode
|
||||
- name: Application metadata
|
||||
id: metadata
|
||||
run: |
|
||||
@@ -41,7 +43,7 @@ jobs:
|
||||
sed -i "s/public static readonly string CommitHash = \"\[DEVELOPMENT\]\";/public static readonly string CommitHash = \"${{ steps.metadata.outputs.COMMIT_HASH }}\";/" CaddyManager/Configurations/Application/ApplicationInfo.cs
|
||||
- name: Publish container
|
||||
run: |
|
||||
dotnet publish \
|
||||
dotnet publish CaddyManager/CaddyManager.csproj \
|
||||
--configuration Release --os linux-musl --arch x64 \
|
||||
/t:PublishContainer -p ContainerRegistry=ghcr.io \
|
||||
-p ContainerRepository=${{ github.repository }} -p:ContainerImageTags='"${{ steps.metadata.outputs.APP_VERSION }};latest"'
|
||||
@@ -6,6 +6,16 @@
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<IsPackable>false</IsPackable>
|
||||
<IsTestProject>true</IsTestProject>
|
||||
<!--
|
||||
The test SDK makes this project an executable, so a solution wide
|
||||
`dotnet publish /t:PublishContainer` containerizes it alongside the web app, pushes both
|
||||
to the same repository and tag, and lets the last one to finish win. That shipped an
|
||||
image whose entrypoint was the test assembly, which exits 0 without output, so the
|
||||
container looked like it started and stopped for no reason.
|
||||
The pipelines publish the web app project explicitly; this keeps a solution wide publish
|
||||
from ever producing an image from the tests again.
|
||||
-->
|
||||
<EnableSdkContainerSupport>false</EnableSdkContainerSupport>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
@@ -8,7 +8,7 @@ public class ApplicationInfo
|
||||
/// <summary>
|
||||
/// The version of the application, to be defined and tagged
|
||||
/// </summary>
|
||||
public static readonly string Version = "1.2.0";
|
||||
public static readonly string Version = "1.2.1";
|
||||
|
||||
/// <summary>
|
||||
/// The commit hash of the application
|
||||
|
||||
Reference in New Issue
Block a user