From 35e375169af228f5e9dd0f7f18ff489dc09d7566 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 4 Oct 2021 17:46:11 -0400 Subject: [PATCH] [CI] Cannot use condition. Using a condition will result in the template being generated which results in the security check to run. We need to use a template and not a condition to avoid it. --- .../automation/templates/release/publish-nugets.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tools/devops/automation/templates/release/publish-nugets.yml b/tools/devops/automation/templates/release/publish-nugets.yml index 689f6262ae99..e7f792504b2b 100644 --- a/tools/devops/automation/templates/release/publish-nugets.yml +++ b/tools/devops/automation/templates/release/publish-nugets.yml @@ -18,11 +18,11 @@ steps: ${{ else }}: VAR_NAME: 'NUGET_PRIVATE_FEED' -- task: NuGetAuthenticate@0 - displayName: 'Authenticate dotnet-tool feed' - inputs: - nuGetServiceConnections: $(ConfigureNuget.Credential) - condition: contains (variables['Build.DefinitionName'], 'private') +- ${{ if not(contains(variables['Build.DefinitionName'], 'private')) }}: + - task: NuGetAuthenticate@0 + displayName: 'Authenticate dotnet-tool feed' + inputs: + nuGetServiceConnections: $(ConfigureNuget.Credential) - task: DownloadPipelineArtifact@2 inputs: