Skip to content

Commit

Permalink
Merge pull request #2598 from FirelyTeam/feature/using-no-private-con…
Browse files Browse the repository at this point in the history
…nections-during-pr

VONK-5414: Use a variable to control the restore via the GitHub package feed or not
  • Loading branch information
mmsmits authored Sep 26, 2023
2 parents e661642 + ec04bcb commit 4b11cf2
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
13 changes: 9 additions & 4 deletions build/azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,15 @@ stages:
inputs:
versionSpec: '6.4.0'

- template: restore.yml@templates
parameters:
nuGetServiceConnections: GitHubPackageGetFeed
nuGetSources: --source https://nuget.pkg.github.com/FirelyTeam/index.json
- ${{ if eq(variables.useGitHubPackageFeed, 'yes') }}:
- template: restore.yml@templates
parameters:
nuGetServiceConnections: GitHubPackageGetFeed
nuGetSources: --source https://nuget.pkg.github.com/FirelyTeam/index.json

- ${{ if eq(variables.useGitHubPackageFeed, 'no') }}:
- script: dotnet restore --source https://api.nuget.org/v3/index.json
displayName: 'Run dotnet restore'

- task: DotNetCoreCLI@2
displayName: Build
Expand Down
3 changes: 2 additions & 1 deletion build/pipeline-variables.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
variables:
isTagBranch: $[startswith(variables['Build.SourceBranch'], 'refs/tags/v')]
GITHUB_PACKAGES_APIKEY: $(GitHubPushPackagesAPIKey) # key is set in variable group APIKeys
NUGET_APIKEY: $(NuGetSDKAPIKey) # key is set in variable group APIKeys
NUGET_APIKEY: $(NuGetSDKAPIKey) # key is set in variable group APIKeys
useGitHubPackageFeed: 'no' # possible values: 'yes', 'no'

0 comments on commit 4b11cf2

Please sign in to comment.