2019-04-18 10:43:26 +09:00
|
|
|
trigger:
|
|
|
|
branches:
|
|
|
|
include:
|
|
|
|
- master
|
|
|
|
|
|
|
|
pool:
|
2020-03-04 02:41:09 +09:00
|
|
|
vmImage: 'windows-latest'
|
2019-04-18 10:43:26 +09:00
|
|
|
|
2020-03-09 17:49:36 +09:00
|
|
|
variables:
|
|
|
|
pushChanges: 'No'
|
|
|
|
|
2019-04-18 10:43:26 +09:00
|
|
|
steps:
|
|
|
|
- task: PowerShell@2
|
2020-03-09 17:49:36 +09:00
|
|
|
displayName: 'Update GCM Archive'
|
2019-04-18 10:43:26 +09:00
|
|
|
inputs:
|
2020-03-09 17:49:36 +09:00
|
|
|
targetType: 'filePath'
|
|
|
|
filePath: './update_gcm_archive.azure.ps1'
|
2019-04-18 10:43:26 +09:00
|
|
|
failOnStderr: true
|
2020-03-09 17:49:36 +09:00
|
|
|
workingDirectory: '.'
|
2019-04-18 10:43:26 +09:00
|
|
|
- task: PowerShell@2
|
2020-03-09 17:49:36 +09:00
|
|
|
displayName: 'Commit and push changes'
|
|
|
|
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
2019-04-18 10:43:26 +09:00
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: '$ErrorActionPreference = "Stop";
|
2019-10-13 04:05:28 +09:00
|
|
|
git config --local user.name "BotPatty";
|
|
|
|
git config --local user.email "ci@zint.ch";
|
2019-04-18 10:43:26 +09:00
|
|
|
git add ./files/GCMCodes.zip;
|
|
|
|
git commit -m "Update GCM Archive [skip ci]";'
|
|
|
|
failOnStderr: true
|
|
|
|
workingDirectory: '.'
|
|
|
|
- task: PowerShell@2
|
|
|
|
displayName: 'Push Changes'
|
2020-03-09 17:49:36 +09:00
|
|
|
condition: and(succeeded(), eq(variables.pushChanges, 'Yes'))
|
2019-04-18 10:43:26 +09:00
|
|
|
env:
|
|
|
|
GitHub_PAT: $(GitHub_PAT)
|
|
|
|
inputs:
|
|
|
|
targetType: 'inline'
|
|
|
|
script: '$ErrorActionPreference = "Stop";
|
|
|
|
git push -q $(GitHub_PAT) HEAD:master;'
|
|
|
|
failOnStderr: true
|
2020-03-09 17:49:36 +09:00
|
|
|
workingDirectory: '.'
|