forked from ykxVK8yL5L/spaces
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (60 loc) · 2.04 KB
/
qinglong-api.yml
File metadata and controls
68 lines (60 loc) · 2.04 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: 使用抱脸SDK创建青龙面板
on:
repository_dispatch:
workflow_dispatch:
inputs:
Token:
description: '抱脸的Token,需要写权限'
required: true
default: ''
Admin:
description: '青龙管理用户名'
required: false
default: ''
Password:
description: '青龙管理密码'
required: false
default: ''
Image:
description: '青龙docker镜像地址'
required: false
default: ''
jobs:
build:
runs-on: macos-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- uses: actions/checkout@v2
with:
persist-credentials: true # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0
- name: 隐藏输入信息
uses: levibostian/action-hide-sensitive-inputs@v1
- name: 安装Rclone
run: |
curl https://rclone.org/install.sh | sudo bash
- name: 检查系统依赖
run: |
rclone -V
python -V
- name: 配置Rclone
run: |
printf "$RCLONE_ENV_FILE" >> ~/.config/rclone/rclone.conf
shell: bash
env:
RCLONE_ENV_FILE : ${{secrets.RCLONE_CONF}}
- name: 安装所需依赖
run: |
python -m pip install --upgrade pip wheel
pip install huggingface_hub
- name: 运行脚本
run: |
rclone_conf_path=$(rclone config file | awk 'NR==2')
python qinglong.py --token="${{ github.event.inputs.Token}}" --rclone_conf_path="$rclone_conf_path" --admin="${{ github.event.inputs.Admin}}" --password="${{ github.event.inputs.Password}}" --image="${{ github.event.inputs.Image}}"
# - name: Delete workflow runs
# uses: Mattraks/delete-workflow-runs@v1.2.3
# with:
# token: ${{ github.token }}
# repository: ${{ github.repository }}
# retain_days: 0
# keep_minimum_runs: 0