trigger: branches: include: - master pool: vmImage: 'windows-latest' variables: pushChanges: 'No' steps: - task: PowerShell@2 displayName: 'Update GCM Archive' inputs: targetType: 'filePath' filePath: './update_gcm_archive.azure.ps1' failOnStderr: true workingDirectory: '.' - task: PowerShell@2 displayName: 'Commit and push changes' condition: and(succeeded(), eq(variables.pushChanges, 'Yes')) inputs: targetType: 'inline' script: '$ErrorActionPreference = "Stop"; git config --local user.name "BotPatty"; git config --local user.email "ci@zint.ch"; git add ./files/GCMCodes.zip; git commit -m "Update GCM Archive [skip ci]";' failOnStderr: true workingDirectory: '.' - task: PowerShell@2 displayName: 'Push Changes' condition: and(succeeded(), eq(variables.pushChanges, 'Yes')) env: GitHub_PAT: $(GitHub_PAT) inputs: targetType: 'inline' script: '$ErrorActionPreference = "Stop"; git push -q $(GitHub_PAT) HEAD:master;' failOnStderr: true workingDirectory: '.'