🐛 Tryin' to fix build
Some checks are pending
Build and Push Dyson Sphere / build (push) Waiting to run

This commit is contained in:
LittleSheep 2025-05-19 13:09:40 +08:00
parent 7845e4c0d7
commit 6bd125408e
8 changed files with 30 additions and 23 deletions

View File

@ -24,9 +24,10 @@ jobs:
username: ${{ secrets.DOCKER_REGISTRY_USERNAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: DysonNetwork.Sphere
file: DysonNetwork.Sphere/Dockerfile
context: .
push: true
tags: xsheep2010/dyson-sphere:latest
platforms: linux/amd64

View File

@ -1 +0,0 @@
node_modules

View File

@ -1,6 +1,6 @@
using System.ComponentModel.DataAnnotations;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Build.Framework;
using Microsoft.EntityFrameworkCore;
namespace DysonNetwork.Sphere.Account;

View File

@ -1,7 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json.Serialization;
using Microsoft.VisualStudio.Web.CodeGenerators.Mvc.Templates.BlazorIdentity.Pages;
using NodaTime;
using Point = NetTopologySuite.Geometries.Point;

View File

@ -1,5 +1,5 @@
using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using System.Text.Json.Serialization;
using NodaTime;
namespace DysonNetwork.Sphere.Developer;

View File

@ -1,21 +1,20 @@
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 8080
EXPOSE 8081
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
RUN apt-get update && apt-get install -y nodejs npm
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["DysonNetwork.Sphere.csproj", "."]
RUN dotnet restore "DysonNetwork.Sphere.csproj"
COPY . .
RUN dotnet build "DysonNetwork.Sphere.csproj" -c $BUILD_CONFIGURATION -o /app/build
WORKDIR "/src/DysonNetwork.Sphere"
RUN dotnet restore
RUN dotnet build -c $BUILD_CONFIGURATION -o /app/build
FROM build AS publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "DysonNetwork.Sphere.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
RUN dotnet publish -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false
FROM base AS final
WORKDIR /app

View File

@ -19,9 +19,9 @@
<Touch Files="$(NpmInstallStampFile)" AlwaysCreate="true" />
</Target>
<Target Name="NpmBuildTailwind" DependsOnTargets="NpmInstall" BeforeTargets="Build">
<Exec Command="npm run css:build" />
</Target>
<!-- <Target Name="NpmBuildTailwind" DependsOnTargets="NpmInstall" BeforeTargets="Build">-->
<!-- <Exec Command="npm run css:build" />-->
<!-- </Target>-->
<ItemGroup>
<PackageReference Include="BCrypt.Net-Next" Version="4.0.3" />
@ -40,7 +40,6 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.Extensions.Hosting" Version="9.0.4" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
<PackageReference Include="MimeTypes" Version="2.5.2">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
@ -102,12 +101,12 @@
<Generator>ResXFileCodeGenerator</Generator>
<LastGenOutput>Email.LandingResource.Designer.cs</LastGenOutput>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Localization\SharedResource.zh-hans.resx">
<DependentUpon>SharedResource.resx</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Update="Resources\Localization\AccountEventResource.zh-hans.resx">
<DependentUpon>AccountEventResource.resx</DependentUpon>
</EmbeddedResource>
<!-- <EmbeddedResource Update="Resources\Localization\SharedResource.zh-hans.resx">-->
<!-- <DependentUpon>SharedResource.resx</DependentUpon>-->
<!-- </EmbeddedResource>-->
<!-- <EmbeddedResource Update="Resources\Localization\AccountEventResource.zh-hans.resx">-->
<!-- <DependentUpon>AccountEventResource.resx</DependentUpon>-->
<!-- </EmbeddedResource>-->
</ItemGroup>
<ItemGroup>
@ -133,4 +132,14 @@
</Compile>
</ItemGroup>
<ItemGroup>
<_ContentIncludedByDefault Remove="app\publish\appsettings.json" />
<_ContentIncludedByDefault Remove="app\publish\DysonNetwork.Sphere.deps.json" />
<_ContentIncludedByDefault Remove="app\publish\DysonNetwork.Sphere.runtimeconfig.json" />
<_ContentIncludedByDefault Remove="app\publish\DysonNetwork.Sphere.staticwebassets.endpoints.json" />
<_ContentIncludedByDefault Remove="app\publish\Keys\Solian.json" />
<_ContentIncludedByDefault Remove="app\publish\package-lock.json" />
<_ContentIncludedByDefault Remove="app\publish\package.json" />
</ItemGroup>
</Project>

View File

@ -1,8 +1,8 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Text.Json;
using System.Text.Json.Serialization;
using Microsoft.EntityFrameworkCore;
using Newtonsoft.Json;
using NodaTime;
namespace DysonNetwork.Sphere.Permission;