mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
try fixing passing secrets into bash scripts
This commit is contained in:
parent
ad3ec2778a
commit
9ba3c9b0d5
1 changed files with 13 additions and 8 deletions
|
|
@ -13,12 +13,15 @@ pool:
|
|||
steps:
|
||||
- checkout: none
|
||||
|
||||
- script: |
|
||||
git config --global user.name "$(GitHub.Name)"
|
||||
git config --global user.email "$(GitHub.Email)"
|
||||
git clone $(Build.Repository.Uri) .
|
||||
git checkout $(System.PullRequest.SourceBranch)
|
||||
- bash: |
|
||||
git config --global user.name $GITHUBNAME
|
||||
git config --global user.email $GITHUBEMAIL
|
||||
git clone $BUILD_REPOSITORY_URI .
|
||||
git checkout $SYSTEM_PULLREQUEST_SOURCEBRANCH
|
||||
displayName: checkout source branch
|
||||
env:
|
||||
GitHubName: $(GitHub.Name)
|
||||
GitHubEmail: $(GitHub.Email)
|
||||
|
||||
- bash: |
|
||||
LASTMSG=$(git log -n 1 --pretty=format:"%s")
|
||||
|
|
@ -70,9 +73,11 @@ steps:
|
|||
displayName: commit or abandon migration
|
||||
condition: and(ne(variables['abortIfJustMigrated.aborted'], 'true'), succeeded())
|
||||
|
||||
- script: |
|
||||
- bash: |
|
||||
git config --global credential.helper store
|
||||
echo "https://$(GitHub.PAT):x-oauth-basic@github.com" >> ~/.git-credentials
|
||||
git push origin $(System.PullRequest.SourceBranch)
|
||||
echo "https://$GITHUBPAT:x-oauth-basic@github.com" >> ~/.git-credentials
|
||||
git push origin $SYSTEM_PULLREQUEST_SOURCEBRANCH
|
||||
displayName: git push
|
||||
condition: and(ne(variables['abortIfJustMigrated.aborted'], 'true'), succeeded())
|
||||
env:
|
||||
GitHubPat: $(GitHub.Pat)
|
||||
|
|
|
|||
Loading…
Reference in a new issue