Skip to content

Commit e99e4b2

Browse files
committed
Fix: Runtime Identifiers
1 parent 8e380dc commit e99e4b2

File tree

4 files changed

+9
-12
lines changed

4 files changed

+9
-12
lines changed

.github/workflows/build-check-webapi.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ env:
99
AOT: true
1010
TRIM: false
1111
EXTRA_OPTIMIZE: true
12-
BUILD_ARCHITECTURE: linux-x64
1312
BUILD_CONFIGURATION: Release
1413

1514
jobs:
@@ -31,10 +30,10 @@ jobs:
3130
dotnet-version: '9.0.x'
3231

3332
- name: Restore Dependencies
34-
run: dotnet restore -r ${{ env.BUILD_ARCHITECTURE }} "WebApi.csproj" -p:Configuration=${${{ env.BUILD_CONFIGURATION }}} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}}
33+
run: dotnet restore "WebApi.csproj" -p:Configuration=${${{ env.BUILD_CONFIGURATION }}} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}}
3534

3635
- name: Build Application
37-
run: dotnet build -r ${{ env.BUILD_ARCHITECTURE }} "WebApi.csproj" -c ${{ env.BUILD_CONFIGURATION }} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}} -p:ExtraOptimize=${${{ env.EXTRA_OPTIMIZE }}}
36+
run: dotnet build "WebApi.csproj" -c ${{ env.BUILD_CONFIGURATION }} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}} -p:ExtraOptimize=${${{ env.EXTRA_OPTIMIZE }}}
3837

3938
container-test:
4039
needs: setup-build-test

.github/workflows/main-release-webapi.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ env:
1313
AOT: true
1414
TRIM: false
1515
EXTRA_OPTIMIZE: true
16-
BUILD_ARCHITECTURE: linux-x64
1716
BUILD_CONFIGURATION: Release
1817

1918
jobs:
@@ -35,10 +34,10 @@ jobs:
3534
dotnet-version: '9.0.x'
3635

3736
- name: Restore Dependencies
38-
run: dotnet restore -r ${{ env.BUILD_ARCHITECTURE }} "WebApi.csproj" -p:Configuration=${${{ env.BUILD_CONFIGURATION }}} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}}
37+
run: dotnet restore "WebApi.csproj" -p:Configuration=${${{ env.BUILD_CONFIGURATION }}} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}}
3938

4039
- name: Build Application
41-
run: dotnet build -r ${{ env.BUILD_ARCHITECTURE }} "WebApi.csproj" -c ${{ env.BUILD_CONFIGURATION }} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}} -p:ExtraOptimize=${${{ env.EXTRA_OPTIMIZE }}}
40+
run: dotnet build "WebApi.csproj" -c ${{ env.BUILD_CONFIGURATION }} -p:AOT=${${{ env.AOT }}} -p:Trim=${${{ env.TRIM }}} -p:ExtraOptimize=${${{ env.EXTRA_OPTIMIZE }}}
4241

4342
build-push-image:
4443
needs: setup-build-test
@@ -74,7 +73,6 @@ jobs:
7473
AOT=${{ env.AOT }}
7574
TRIM=${{ env.TRIM }}
7675
EXTRA_OPTIMIZE=${{ env.EXTRA_OPTIMIZE }}
77-
BUILD_ARCHITECTURE=${{ env.BUILD_ARCHITECTURE }}
7876
BUILD_CONFIGURATION=${{ env.BUILD_CONFIGURATION }}
7977
8078
container-test:

src/WebApi/Dockerfile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,24 +14,23 @@ RUN apt-get update \
1414
ARG AOT
1515
ARG TRIM
1616
ARG EXTRA_OPTIMIZE
17-
ARG BUILD_ARCHITECTURE
1817
ARG BUILD_CONFIGURATION
1918

2019
WORKDIR /src
2120

2221
COPY ["WebApi/WebApi.csproj", "WebApi/"]
2322

24-
RUN dotnet restore -r $BUILD_ARCHITECTURE "./WebApi/WebApi.csproj" -p:Configuration=${BUILD_CONFIGURATION} -p:AOT=${AOT} -p:Trim=${TRIM}
23+
RUN dotnet restore "./WebApi/WebApi.csproj" -p:Configuration=${BUILD_CONFIGURATION} -p:AOT=${AOT} -p:Trim=${TRIM}
2524

2625
COPY . .
2726

2827
WORKDIR "/src/WebApi"
2928

30-
RUN dotnet build -r $BUILD_ARCHITECTURE "WebApi.csproj" -c $BUILD_CONFIGURATION -p:AOT=${AOT} -p:Trim=${TRIM} -p:ExtraOptimize=${EXTRA_OPTIMIZE} -o /app/build
29+
RUN dotnet build "WebApi.csproj" -c $BUILD_CONFIGURATION -p:AOT=${AOT} -p:Trim=${TRIM} -p:ExtraOptimize=${EXTRA_OPTIMIZE} -o /app/build
3130

3231
FROM build AS publish
3332

34-
RUN dotnet publish -r $BUILD_ARCHITECTURE "WebApi.csproj" --no-restore -c $BUILD_CONFIGURATION -p:AOT=${AOT} -p:Trim=${TRIM} -p:ExtraOptimize=${EXTRA_OPTIMIZE} -o /app/publish
33+
RUN dotnet publish "WebApi.csproj" --no-restore -c $BUILD_CONFIGURATION -p:AOT=${AOT} -p:Trim=${TRIM} -p:ExtraOptimize=${EXTRA_OPTIMIZE} -o /app/publish
3534

3635
FROM base AS final
3736

src/WebApi/WebApi.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<TargetFramework>net9.0</TargetFramework>
55
<Nullable>enable</Nullable>
66
<ImplicitUsings>enable</ImplicitUsings>
7-
7+
<RuntimeIdentifiers>linux-x64;linux-arm64</RuntimeIdentifiers>
8+
89
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
910
<DockerfileContext>..\..</DockerfileContext>
1011
<DockerComposeProjectPath>..\..\docker-compose.dcproj</DockerComposeProjectPath>

0 commit comments

Comments
 (0)