php-micro-file-server/.drone.yml

66 lines
1.3 KiB
YAML
Raw Normal View History

2024-09-13 14:11:37 +08:00
kind: pipeline
name: "发布micro-php-nacos"
type: docker
platform:
os: linux
arch: amd64
node:
runner: localagent
volumes:
- name: cache
host:
path: /tmp/.composer
trigger:
event:
2024-09-13 14:19:24 +08:00
- push
ref:
- refs/tags/*
2024-09-13 14:11:37 +08:00
branch:
- master
steps:
- name: "安装依赖"
image: annon/docker-composer:0.1
pull: if-not-exists
volumes:
- name: cache
path: /root/.composer
commands:
# 使用阿里云源
- "composer config repo.packagist composer https://mirrors.aliyun.com/composer/"
# 安装依赖包
- "composer install"
- name: "构建Docker镜像"
image: plugins/docker
pull: if-not-exists
settings:
mirror: https://dockerpull.com
registry: anxan-docker.pkg.coding.net
username:
from_secret: hub_name
password:
from_secret: hub_password
repo: anxan-docker.pkg.coding.net/d/repo/micro-php-nacos
tags: "0.0.5"
- name: "完成通知"
image: anxan-docker.pkg.coding.net/d/repo/drone-email-notify:1.0
pull: always
environment:
EMAIL_HOST:
from_secret: email_host
EMAIL_PASS:
from_secret: email_pass
EMAIL_NAME:
from_secret: email_name
EMAIL_PORT:
from_secret: email_port
EMAIL_FROM:
from_secret: email_from
EMAIL_TO:
from_secret: email_to