From b720b4482736b784105385bcf23f86dcb1d0c28a Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Mon, 3 May 2021 11:35:18 -0400 Subject: [PATCH] [CI] Just requests translations in the cron job. (#11420) Execute the loc step + the creation of a PR only in the cron job and skipt it in anyother build. --- .../automation/templates/build/configure.yml | 31 ++++++++++--------- 1 file changed, 16 insertions(+), 15 deletions(-) diff --git a/tools/devops/automation/templates/build/configure.yml b/tools/devops/automation/templates/build/configure.yml index cf1a223189d5..436a9d538c53 100644 --- a/tools/devops/automation/templates/build/configure.yml +++ b/tools/devops/automation/templates/build/configure.yml @@ -127,21 +127,22 @@ steps: continueOnError: true workingDirectory: $(Build.SourcesDirectory)\tools\devops -- task: OneLocBuild@2 - condition: and(succeeded(), eq(variables.isMain, 'True')) - continueOnError: true - env: - SYSTEM_ACCESSTOKEN: $(System.AccessToken) - inputs: - locProj: '$(Build.SourcesDirectory)\Localize\LocProject.json' - outDir: '$(Build.ArtifactStagingDirectory)' - isCreatePrSelected: false - isAutoCompletePrSelected: false - prSourceBranchPrefix: 'locfiles' - repoType: gitHub - gitHubPatVariable: '$(GitHub.Token)' - packageSourceAuth: patAuth - patVariable: '$(OneLocBuild--PAT)' +- ${{ if eq(variables['Build.Reason'], 'Schedule') }}: + - task: OneLocBuild@2 + condition: and(succeeded(), eq(variables.isMain, 'True')) + continueOnError: true + env: + SYSTEM_ACCESSTOKEN: $(System.AccessToken) + inputs: + locProj: '$(Build.SourcesDirectory)\Localize\LocProject.json' + outDir: '$(Build.ArtifactStagingDirectory)' + isCreatePrSelected: true + isAutoCompletePrSelected: false + prSourceBranchPrefix: 'locfiles' + repoType: gitHub + gitHubPatVariable: '$(GitHub.Token)' + packageSourceAuth: patAuth + patVariable: '$(OneLocBuild--PAT)' - task: PublishBuildArtifacts@1 condition: and(succeeded(), eq(variables.isMain, 'True'))