Skip to content

Commit

Permalink
Upgrade to .NET 8 (#937)
Browse files Browse the repository at this point in the history
* Upgrade to .NET 8


Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp authored Jan 9, 2024
1 parent 84ee385 commit acd4284
Show file tree
Hide file tree
Showing 146 changed files with 19,404 additions and 31,084 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,23 +65,23 @@ jobs:
run: cat src/AssemblyInfo.cs

- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.4.0
uses: docker/metadata-action@v5.4.0
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }}
type=raw,value=${{ steps.gitversion.outputs.semVer }}
- name: Build and Push Container Image for ${{ matrix.dockerfile }}
uses: docker/build-push-action@v4.0.0
uses: docker/build-push-action@v5.1.0
with:
context: .
push: ${{ contains(github.ref, 'refs/heads/main') || contains(github.ref, 'refs/heads/develop') ||contains(github.head_ref, 'release/') || contains(github.head_ref, 'feature/') || contains(github.head_ref, 'develop') }}
Expand Down Expand Up @@ -124,7 +124,7 @@ jobs:

- name: Anchore Container Scan
id: anchore-scan
uses: anchore/[email protected].5
uses: anchore/[email protected].8
continue-on-error: true
if: ${{ contains(github.ref, 'refs/heads/main') || contains(github.head_ref, 'release/') }}
with:
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:

- uses: actions/setup-dotnet@v3
with:
dotnet-version: "6.0.x"
dotnet-version: "8.0.x"

- name: Enable NuGet cache
uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ on:
workflow_dispatch:

env:
DOTNET_VERSION: '6.0.x'
DOTNET_VERSION: '8.0.x'

jobs:
analyze:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/license-scanning.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
workflow_dispatch:

env:
DOTNET_VERSION: '6.0.x'
DOTNET_VERSION: '8.0.x'

jobs:
scan:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,23 @@ jobs:
run: echo "::set-output name=date::$(date +'%Y-%m-%d')"

- name: Log in to the Container registry
uses: docker/login-action@v2.1.0
uses: docker/login-action@v3.0.0
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4.4.0
uses: docker/metadata-action@v5.4.0
with:
images: ${{ matrix.image }}
tags: |
type=raw,value=develop-latest
type=raw,value=develop-nightly-${{ steps.date.outputs.date }}
- name: Build and Push Container Image for ${{ matrix.feature }}
uses: docker/build-push-action@v4.0.0
uses: docker/build-push-action@v5.1.0
with:
context: .
push: true
Expand All @@ -80,7 +80,7 @@ jobs:

- name: Anchore Container Scan
id: anchore-scan
uses: anchore/[email protected].5
uses: anchore/[email protected].8
with:
image: ${{ fromJSON(steps.meta.outputs.json).tags[0] }}
fail-build: true
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ on:
workflow_dispatch:

env:
DOTNET_VERSION: '6.0.x'
DOTNET_VERSION: '8.0.x'

jobs:
secret-scan:
Expand All @@ -31,7 +31,7 @@ jobs:
fetch-depth: 0

- name: TruffleHog OSS
uses: trufflesecurity/trufflehog@v3.34.0
uses: trufflesecurity/trufflehog@v3.63.7
with:
path: ./
base: ${{ github.event.repository.default_branch }}
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
workflow_dispatch:

env:
DOTNET_VERSION: '6.0.x'
DOTNET_VERSION: '8.0.x'

jobs:
unit-tests-and-codecov:
Expand Down Expand Up @@ -135,14 +135,14 @@ jobs:
- name: Generate LivingDoc HTML
if: always()
run: livingdoc test-assembly Monai.Deploy.WorkflowManager.WorkflowExecutor.IntegrationTests.dll -t TestExecution.json
working-directory: ./tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net6.0
working-directory: ./tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net8.0

- name: Publish report
if: always()
uses: actions/[email protected]
with:
name: WorkflowExecutorIntegrationTestReport
path: ./tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net6.0/LivingDoc.html
path: ./tests/IntegrationTests/WorkflowExecutor.IntegrationTests/bin/Debug/net8.0/LivingDoc.html

task-manager-integration-tests:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -212,19 +212,25 @@ jobs:
- name: Generate LivingDoc HTML
if: always()
run: livingdoc test-assembly Monai.Deploy.WorkflowManager.TaskManager.IntegrationTests.dll -t TestExecution.json
working-directory: ./tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net6.0
working-directory: ./tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net8.0

- name: Publish report
if: always()
uses: actions/[email protected]
with:
name: TaskManagerIntegrationTestReport
path: ./tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net6.0/LivingDoc.html
path: ./tests/IntegrationTests/TaskManager.IntegrationTests/bin/Debug/net8.0/LivingDoc.html

sonarscanner:
runs-on: ubuntu-latest
needs: unit-tests-and-codecov
steps:
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: 17
distribution: 'zulu' # Alternative distribution options are available.

- name: Checkout repository
uses: actions/checkout@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions TaskManager.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy as build
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy as build

# Install the tools
RUN dotnet tool install --tool-path /tools dotnet-trace
Expand All @@ -27,7 +27,7 @@ RUN wget -O mc https://dl.min.io/client/mc/release/linux-amd64/archive/mc.RELEAS
RUN chmod +x mc

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
4 changes: 2 additions & 2 deletions WorkflowManager.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

FROM mcr.microsoft.com/dotnet/sdk:6.0-jammy as build
FROM mcr.microsoft.com/dotnet/sdk:8.0-jammy as build

# Install the tools
RUN dotnet tool install --tool-path /tools dotnet-trace
Expand All @@ -26,7 +26,7 @@ RUN echo "Building MONAI Workflow Manager..."
RUN dotnet publish -c Release -o out --nologo src/WorkflowManager/WorkflowManager/Monai.Deploy.WorkflowManager.csproj

# Build runtime image
FROM mcr.microsoft.com/dotnet/aspnet:6.0-jammy
FROM mcr.microsoft.com/dotnet/aspnet:8.0-jammy

ENV DEBIAN_FRONTEND=noninteractive

Expand Down
Loading

0 comments on commit acd4284

Please sign in to comment.