Skip to content

Commit

Permalink
updated docker files to support .Net 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
bezzad committed Nov 11, 2023
1 parent da5ab40 commit d6107e0
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/dotnet-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Setup .NET Core 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Install Downloader Dependencies
run: dotnet restore ./src/Downloader/Downloader.csproj

- name: Build Downloader Project
run: dotnet build ./src/Downloader/Downloader.csproj

- name: Install Downloader.DummyHttpServer Dependencies
run: dotnet restore ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj

- name: Build Downloader.DummyHttpServer Project
run: dotnet build ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj

- name: Install Downloader.Test Dependencies
run: dotnet restore ./src/Downloader.Test/Downloader.Test.csproj

- name: Build Downloader.Test Project
run: dotnet build ./src/Downloader.Test/Downloader.Test.csproj

- name: Test
run: dotnet test ./src/Downloader.Test/Downloader.Test.csproj --no-build --verbosity detailed
14 changes: 14 additions & 0 deletions .github/workflows/dotnet-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,25 +7,39 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3

- name: Setup .NET Core 3.1
uses: actions/setup-dotnet@v3
with:
dotnet-version: 3.1.x

- name: Setup .NET Core 6.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x

- name: Setup .NET Core 7.0
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x

- name: Install Downloader Dependencies
run: dotnet restore ./src/Downloader/Downloader.csproj

- name: Build Downloader Project
run: dotnet build ./src/Downloader/Downloader.csproj

- name: Install Downloader.DummyHttpServer Dependencies
run: dotnet restore ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj

- name: Build Downloader.DummyHttpServer Project
run: dotnet build ./src/Downloader.DummyHttpServer/Downloader.DummyHttpServer.csproj

- name: Install Downloader.Test Dependencies
run: dotnet restore ./src/Downloader.Test/Downloader.Test.csproj

- name: Build Downloader.Test Project
run: dotnet build ./src/Downloader.Test/Downloader.Test.csproj

- name: Test
run: dotnet test ./src/Downloader.Test/Downloader.Test.csproj --no-build --verbosity detailed
2 changes: 1 addition & 1 deletion src/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ services:
# container_name: downloader-win

linux-net6:
image: mcr.microsoft.com/dotnet/sdk:6.0
image: mcr.microsoft.com/dotnet/sdk:7.0
build:
context: .
dockerfile: ./dockerfile
Expand Down
4 changes: 2 additions & 2 deletions src/dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Use the official Microsoft .NET 6 SDK image as the base image
FROM mcr.microsoft.com/dotnet/sdk:6.0 AS build
FROM mcr.microsoft.com/dotnet/sdk:7.0 AS build

# Set the working directory in the container
WORKDIR /app
Expand All @@ -9,7 +9,7 @@ COPY . ./

# Build the project
RUN dotnet restore
RUN dotnet build --configuration Release --no-restore -verbosity:m -f net6.0
RUN dotnet build --configuration Release --no-restore -verbosity:m -f net7.0

# Set the entrypoint
ENTRYPOINT dotnet test --logger "console;verbosity=detailed"

0 comments on commit d6107e0

Please sign in to comment.