chore(woodpecker): 更新工作流配置文件结构

重构了 .woodpecker/my-first-workflow.yaml 文件,
将 pipeline 部分重命名为 steps,并添加了 SSH 密钥配置,
同时将全局变量提取到 variables 部分使用 YAML 锚点进行统一管理。
```
This commit is contained in:
昔念
2026-01-26 23:31:39 +08:00
parent 1a95ce8c48
commit 4f962ab2f2

View File

@@ -10,18 +10,12 @@ clone:
git:
image: woodpeckerci/plugin-git
settings:
depth: 50
lfs: false
use-ssh: true
ssh-key-private:
from_secret: WOODPECKER_SSH_KEY
# Woodpecker原生顶层字段3核心流水线唯一步骤容器
pipeline:
# 全局配置仅在pipeline内按需修改这4项即可
SCREEN_NAME: logic_service
REMOTE_EXE_DIR: /opt/logic
JSON_CONFIG_URL: "https://你的JSON配置地址.com/deploy.json"
LOG_PATH: "$HOME/run.log"
# Woodpecker原生顶层字段3流水线步骤
steps:
# 1. 缓存Go依赖加速构建
cache-go-mod:
image: woodpeckerci/plugin-cache
@@ -172,3 +166,10 @@ pipeline:
- echo "======================================"
depends_on:
- deploy-to-servers
# 全局配置变量
variables:
- &screen_name "logic_service"
- &remote_exe_dir "/opt/logic"
- &json_config_url "https://你的JSON配置地址.com/deploy.json"
- &log_path "$HOME/run.log"