Hexo-Async-Offends/.drone.yml

67 lines
1.3 KiB
YAML
Raw Normal View History

2024-07-19 07:47:10 +00:00
kind: pipeline
type: docker
name: Build Hexo-Images
trigger:
event:
include:
- custom
node:
drone: abroad
steps:
- name: Build Hexo-Images
image: plugins/docker
# 仅当本地不存在该镜像时才拉取
# pull: if-not-exists
settings:
registry:
from_secret: REGISTRY
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo:
from_secret: REPO
# 是否禁止推送镜像
dry_run: false
tags:
- hexo
context: ./
dockerfile: ./Dockerfile-hexo
build_args:
- IMAGENAME=node:alpine
# - IMAGENAME=registry.cn-hangzhou.aliyuncs.com/offends/hexo:node-alpine
when:
branch:
- main
- name: Build Hexo-Async-Images
image: plugins/docker
# 仅当本地不存在该镜像时才拉取
# pull: if-not-exists
settings:
registry:
from_secret: REGISTRY
username:
from_secret: DOCKER_USERNAME
password:
from_secret: DOCKER_PASSWORD
repo:
from_secret: REPO
# 是否禁止推送镜像
dry_run: false
tags:
- hexo-async
context: ./
dockerfile: ./Dockerfile-hexo-async
build_args:
- IMAGENAME=registry.cn-hangzhou.aliyuncs.com/offends/hexo:hexo
when:
branch:
- main
volumes:
- name: dockersock
host:
path: /var/run/docker.sock