Skip to content

Commit

Permalink
CI Updates
Browse files Browse the repository at this point in the history
  • Loading branch information
sphexator committed Jan 15, 2025
1 parent ec8e85a commit 02c4f97
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 47 deletions.
23 changes: 14 additions & 9 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,21 +1,26 @@
**/.dockerignore
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/.idea
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/azds.yaml
**/charts
**/bin
**/charts
**/docker-compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/Dockerfile
**/Dockerfile.develop
**/docker-compose.yml
**/docker-compose.*.yml
**/*.dbmdl
**/*.jfm
**/secrets.dev.yaml
**/values.dev.yaml
**/.toolstarget
LICENSE
README.md
/Hanekawa/Properties/launchSettings.json
2 changes: 1 addition & 1 deletion .github/workflows/dockerpublish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
- uses: actions/checkout@v2

- name: Build image
run: docker build . --file Hanekawa/Dockerfile --tag image
run: docker build . --file Hanekawa/Hanekawa.Bot/Dockerfile --tag image

- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login docker.pkg.github.com -u ${{ github.actor }} --password-stdin
Expand Down
24 changes: 0 additions & 24 deletions Dockerfile

This file was deleted.

26 changes: 14 additions & 12 deletions Hanekawa.Bot/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,25 +1,27 @@
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
USER $APP_UID
WORKDIR /app
EXPOSE 80
EXPOSE 443
EXPOSE 8080
EXPOSE 8081

ENV botToken, applicationId, connectionString

FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:9.0 AS build
ARG BUILD_CONFIGURATION=Release
WORKDIR /src
COPY ["Hanekawa.Bot/Hanekawa.csproj", "Hanekawa/"]
COPY ["Hanekawa.Bot/Hanekawa.Application.csproj", "Hanekawa.Application/"]
COPY ["Hanekawa.Bot/Hanekawa.Infrastructure.csproj", "Hanekawa.Infrastructure/"]
COPY ["nuget.config", ""]
COPY ["Hanekawa.Bot/Hanekawa.Bot.csproj", "Hanekawa.Bot/"]
COPY ["Hanekawa.Infrastructure/Hanekawa.Infrastructure.csproj", "Hanekawa.Infrastructure/"]
COPY ["Hanekawa.Application/Hanekawa.Application.csproj", "Hanekawa.Application/"]
COPY ["Hanekawa/Hanekawa.csproj", "Hanekawa/"]
RUN dotnet restore "Hanekawa.Bot/Hanekawa.Bot.csproj"
COPY . .
WORKDIR "/src/Hanekawa.Bot"
RUN dotnet build "Hanekawa.Bot.csproj" -c Release -o /app/build
RUN dotnet build "Hanekawa.Bot.csproj" -c $BUILD_CONFIGURATION -o /app/build

FROM build AS publish
RUN dotnet publish "Hanekawa.Bot.csproj" -c Release -o /app/publish
ARG BUILD_CONFIGURATION=Release
RUN dotnet publish "Hanekawa.Bot.csproj" -c $BUILD_CONFIGURATION -o /app/publish /p:UseAppHost=false

FROM base AS final
WORKDIR /app
COPY --from=publish /app/publish .
ENTRYPOINT ["dotnet", "Hanekawa.Bot.dll"]
ENTRYPOINT ["dotnet", "Hanekawa.Bot.dll"]
2 changes: 1 addition & 1 deletion Hanekawa.Bot/Hanekawa.Bot.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@
</ItemGroup>

<ItemGroup>
<None Remove="Data\Template\ProfileTemplate.png" />
<Content Include="..\.dockerignore">
<Link>.dockerignore</Link>
</Content>
<None Remove="Data\Template\ProfileTemplate.png" />
<Content Include="Data\Template\ProfileTemplate.png">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
Expand Down

0 comments on commit 02c4f97

Please sign in to comment.