ci/woodpecker/push/woodpecker Pipeline was successful
Branch download by the card form 'version' field: standalone packs a flat .shr (no xbot_robot/xbot_extensions, no internal deps), private keeps the current .bot. Also enable kaniko layer cache to skip pip install on code-only builds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
69 lines
1.6 KiB
YAML
69 lines
1.6 KiB
YAML
when:
|
|
- event: push
|
|
branch:
|
|
include:
|
|
- main
|
|
- feature/*
|
|
|
|
steps:
|
|
- name: build
|
|
image: woodpeckerci/plugin-kaniko
|
|
settings:
|
|
username:
|
|
from_secret: registry_username
|
|
password:
|
|
from_secret: registry_password
|
|
tags: latest
|
|
repo: woni/office-xbot-feishu
|
|
registry: registry.woni.link
|
|
cache: true
|
|
cache_repo: woni/office-xbot-feishu-cache
|
|
mirrors:
|
|
- 5c492fmo.mirror.aliyuncs.com
|
|
dockerfile: ./Dockerfile
|
|
|
|
- name: scp
|
|
image: appleboy/drone-scp
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
username:
|
|
from_secret: ssh_user
|
|
port: 22
|
|
key:
|
|
from_secret: ssh_key
|
|
tags: 0.1
|
|
target: /home/docker/office-xbot-feishu
|
|
source: ./docker-compose.yaml
|
|
|
|
- name: deploy
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
from_secret: ssh_host
|
|
username:
|
|
from_secret: ssh_user
|
|
port: 22
|
|
key:
|
|
from_secret: ssh_key
|
|
script:
|
|
- cd /home/docker/office-xbot-feishu
|
|
# - sudo sed -i "s#development#production#g" .flaskenv
|
|
- docker compose down
|
|
- docker compose rm
|
|
- docker compose pull
|
|
- docker compose --env-file .env up -d
|
|
|
|
- name: feishu
|
|
image: curlimages/curl:8.8.0
|
|
commands:
|
|
- >
|
|
curl -fsS -X POST "$FEISHU_WEBHOOK"
|
|
-H 'Content-Type: application/json'
|
|
-d '{"msg_type":"text","content":{"text":"部署成功"}}'
|
|
environment:
|
|
FEISHU_WEBHOOK:
|
|
from_secret: feishu_webhook
|
|
when:
|
|
- status: [failure, success]
|