Skip to content

Commit

Permalink
Merge pull request #67 from Lombiq/issue/OSOE-396
Browse files Browse the repository at this point in the history
OSOE-396: Only run setup-dotnet if the image doesn't contain the same .NET version
  • Loading branch information
sarahelsaig authored Oct 13, 2022
2 parents baf3316 + ba499a4 commit 654cfe2
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
12 changes: 8 additions & 4 deletions .github/actions/setup-dotnet/action.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
name: Set up .NET
name: Set up .NET
description: Sets up the .NET SDK.

inputs:
dotnet-version:
required: false
default: 6.0.*
default: 6.0.x
description: Version of the .NET SDK to set up.

runs:
using: "composite"
steps:
- name: Set environment variables
- name: Set Environment Variables
shell: pwsh
run: |
# This ceremony is needed to make the env vars available in subsequent steps too, see:
Expand All @@ -22,7 +22,11 @@ runs:
"DOTNET_CLI_TELEMETRY_OPTOUT=true" >> $Env:GITHUB_ENV
$Env:DOTNET_CLI_TELEMETRY_OPTOUT = "true"
# setup-dotnet won't install a version if it is already preinstalled on the VM. Note that it checks the latest
# released .NET version for wildcard versions. So, e.g. with 6.0.x specified it'll still install 6.0.402 if the VM
# only has 6.0.401. See: https://github.com/actions/setup-dotnet/issues/284#issuecomment-1276250960.
- name: Set up .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ inputs.dotnet-version }}
2 changes: 1 addition & 1 deletion .github/workflows/build-and-test-orchard-core.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
dotnet-version:
required: false
type: string
default: 6.0.*
default: 6.0.x
description: Version of the .NET SDK to set up.
build-directory:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-dotnet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:
dotnet-version:
required: false
type: string
default: 6.0.*
default: 6.0.x
description: Version of the .NET SDK to set up.
build-directory:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/deploy-to-azure-app-service.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
dotnet-version:
required: false
type: string
default: 6.0.*
default: 6.0.x
description: Version of the .NET SDK to set up.
build-directory:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-nuget.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
dotnet-version:
required: false
type: string
default: 6.0.*
default: 6.0.x
description: Version of the .NET SDK to set up.
timeout-minutes:
required: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-analysis-failure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ on:
dotnet-version:
required: false
type: string
default: 6.0.*
default: 6.0.x
description: Version of the .NET SDK to set up.
build-directory:
required: false
Expand Down

0 comments on commit 654cfe2

Please sign in to comment.