build: 支持构建并上传网页到景安虚机。xN
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
parent
c2dca0e57b
commit
0549b3c385
31
.drone.yml
31
.drone.yml
@ -187,29 +187,13 @@ trigger:
|
|||||||
- develop
|
- develop
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: export
|
|
||||||
image: plugins/docker
|
|
||||||
settings:
|
|
||||||
registry: docker-registry.ivanli.cc
|
|
||||||
username:
|
|
||||||
from_secret: ivan-docker-username
|
|
||||||
password:
|
|
||||||
from_secret: ivan-docker-password
|
|
||||||
repo: docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload
|
|
||||||
dockerfile: Dockerfile
|
|
||||||
target: upload
|
|
||||||
cache_from:
|
|
||||||
- docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-deps:${DRONE_BRANCH}${DRONE_TAG}-amd64
|
|
||||||
tags:
|
|
||||||
- '${DRONE_COMMIT_SHA:0:8}'
|
|
||||||
- '${DRONE_BRANCH}${DRONE_TAG}'
|
|
||||||
|
|
||||||
- name: upload
|
- name: upload
|
||||||
image: docker:dind
|
image: docker:dind
|
||||||
volumes:
|
volumes:
|
||||||
- name: dockersock
|
- name: dockersock
|
||||||
path: /var/run/docker.sock
|
path: /var/run
|
||||||
commands:
|
commands:
|
||||||
|
- docker build -t docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_COMMIT_SHA:0:8} .
|
||||||
- docker run --rm -t -e FTP_ACCOUNT=${FTP_ACCOUNT} -e FTP_PASSWORD=${FTP_PASSWORD} -e FTP_HOST=${FTP_HOST} docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_COMMIT_SHA:0:8}
|
- docker run --rm -t -e FTP_ACCOUNT=${FTP_ACCOUNT} -e FTP_PASSWORD=${FTP_PASSWORD} -e FTP_HOST=${FTP_HOST} docker-registry.ivanli.cc/ivan/tailwind-nextjs-blog-upload:${DRONE_COMMIT_SHA:0:8}
|
||||||
environment:
|
environment:
|
||||||
FTP_ACCOUNT:
|
FTP_ACCOUNT:
|
||||||
@ -251,14 +235,3 @@ steps:
|
|||||||
🌐 {{ build.link }}
|
🌐 {{ build.link }}
|
||||||
{{/success}}
|
{{/success}}
|
||||||
|
|
||||||
services:
|
|
||||||
- name: docker
|
|
||||||
image: docker:dind
|
|
||||||
privileged: true
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
path: /var/run
|
|
||||||
|
|
||||||
volumes:
|
|
||||||
- name: dockersock
|
|
||||||
temp: {}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user