From d791681c1db94d44e0454a8d0ff62ee5c484e77d Mon Sep 17 00:00:00 2001 From: anfu Date: Fri, 13 Sep 2024 14:11:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=87=AA=E5=8A=A8=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=B5=81=E7=A8=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..4cc4dcd --- /dev/null +++ b/.drone.yml @@ -0,0 +1,64 @@ +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: + - tag + 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 \ No newline at end of file