-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathupdate-image.yml
35 lines (34 loc) · 945 Bytes
/
update-image.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
trigger:
branches:
include:
- main
paths:
include:
- 'new_scripts/*.ps1'
pool:
vmImage: ubuntu-latest
steps:
- checkout: self
persistCredentials: true
- task: AzureCLI@2
inputs:
azureSubscription: 'AzureServiceConnection'
scriptType: 'bash'
scriptLocation: 'inlineScript'
inlineScript: |
git checkout -b main
afile=$(ls new_scripts)
mv new_scripts/$afile .
./updateImage.sh $(System.TeamProject) $afile
mv $afile done_scripts/
#
# GitHub commands require granting "Bypass policies when pushing"
# and "Contribute" rights to the Project's Build Service User account
# under Project settings > Repositories > Security.
#
git config --global user.email "$(GitHubUser)"
git config --global user.name "$(System.TeamProject)"
git status
git add .
git commit -m "Processed script"
git push --set-upstream origin main