fix: Provide a password using STDIN

This commit is contained in:
Bo-Yi Wu 2018-06-27 14:59:29 +08:00
parent d549026e50
commit 4c994f5045

View File

@ -41,10 +41,11 @@ test_script:
deploy_script: deploy_script:
- ps: | - ps: |
$ErrorActionPreference = 'Stop';
if ( $env:APPVEYOR_PULL_REQUEST_NUMBER ) { if ( $env:APPVEYOR_PULL_REQUEST_NUMBER ) {
Write-Host Nothing to deploy. Write-Host Nothing to deploy.
} else { } else {
docker login --username $env:DOCKER_USERNAME --password $env:DOCKER_PASSWORD echo $env:DOCKER_PASSWORD | docker login --username $env:DOCKER_USERNAME --password-stdin
if ( $env:APPVEYOR_REPO_TAG -eq 'true' ) { if ( $env:APPVEYOR_REPO_TAG -eq 'true' ) {
$major,$minor,$patch = $env:APPVEYOR_REPO_TAG_NAME.split('.') $major,$minor,$patch = $env:APPVEYOR_REPO_TAG_NAME.split('.')
docker push appleboy/drone-telegram:windows-amd64 docker push appleboy/drone-telegram:windows-amd64