1. 说明:
自动化运维工具有:
青龙:https://github.com/whyour/qinglong
我是想让他做一些自动任务的管理,因为有ui,应该会效率高点
2. 安装
参考官方文档
3. 使用
参考这个https://github.com/6dylan6/jdpro
基本就知道大概流程了
就是先添加 一个github订阅,里面是所有的js脚本
订阅完后,任务列表就有很多任务了,
https://cloud.tencent.com/developer/article/2087378
4. 研究
以这个项目为例:
https://sitoi.github.io/dailycheckin/
我参考这个,写一个自动获取博客的更新zip
github的api,获取当前项目的最新release
https://docs.github.com/en/rest/releases/releases?apiVersion=2022-11-28#get-the-latest-release
这个api需要一个token
有三种方式,选最后一种吧 Personal access tokens
4.1 我的第一个脚本
4.1.1 脚本地址:
https://github.com/ftyszyx/qinglong
4.1.2 拉取代码
增加订阅:

自动添加任务全关掉
4.1.3 添加配置

新建一个config.json,内容参考config.bak

4.1.4 添加任务


4.1.5 添加依赖

5. 问题
生成的文件,只能在docker映射的目录下
无法被其它用户访问,需要加一个目录映射
6. 总结
qinglong类似于一个简化版本的jenkins.
主要功能就是管理定时任务,
定时执行外部的脚本