feat(windows): support windows docker.

This commit is contained in:
Bo-Yi Wu 2017-12-19 09:52:09 +08:00
parent 5d287eff2c
commit fdc76c4f08

View File

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