-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
163 lines (140 loc) · 3.84 KB
/
action.yml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
name: Aliyun Signin
author: ImYrS
description: 'AliyunDrive signin automatically'
inputs:
REFRESH_TOKENS:
description: 'AliyunDrive refresh tokens'
required: true
GP_TOKEN:
description: 'Github personal access token'
required: false
default: ''
PUSH_TYPES:
description: 'Push types for signin result'
required: false
default: ''
DO_NOT_REWARD:
description: 'Do not reward'
required: false
default: 'false'
SERVERCHAN_SEND_KEY:
description: 'ServerChan send key'
required: false
default: ''
TELEGRAM_BOT_TOKEN:
description: 'Telegram bot token'
required: false
default: ''
TELEGRAM_CHAT_ID:
description: 'Telegram chat id'
required: false
default: ''
PUSHPLUS_TOKEN:
description: 'PushPlus token'
required: false
default: ''
PUSHPLUS_TOPIC:
description: 'PushPlus topic'
required: false
default: ''
SMTP_HOST:
description: 'SMTP host'
required: false
default: ''
SMTP_PORT:
description: 'SMTP port'
required: false
default: ''
SMTP_TLS:
description: 'SMTP TLS'
required: false
default: 'true'
SMTP_USER:
description: 'SMTP user'
required: false
default: ''
SMTP_PASSWORD:
description: 'SMTP password'
required: false
default: ''
SMTP_SENDER:
description: 'SMTP sender'
required: false
default: ''
SMTP_RECEIVER:
description: 'SMTP receiver'
required: false
default: ''
FEISHU_WEBHOOK:
description: 'Feishu webhook'
required: false
default: ''
WEBHOOK_URL:
description: 'Webhook url'
required: false
default: ''
CQHTTP_ENDPOINT:
description: 'go-cqhttp endpoint'
required: false
default: ''
CQHTTP_USER_ID:
description: 'go-cqhttp user id'
required: false
default: ''
CQHTTP_ACCESS_TOKEN:
description: 'go-cqhttp access token'
required: false
default: ''
runs:
using: composite
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- id: version
uses: pozetroninc/github-action-get-latest-release@master
with:
repository: ImYrS/aliyun-auto-signin
excludes: prerelease, draft
token: ${{ inputs.GP_TOKEN }}
- name: Download
shell: bash
run: |
wget https://github.com/ImYrS/aliyun-auto-signin/archive/refs/tags/${{ steps.version.outputs.release }}.zip -O release.zip
rm -rf release
unzip release.zip -d release
rm release.zip
- name: Run
shell: bash
run: |
cd release
cd $(ls -dt */|head -1 )
pip install -r requirements.txt
python app.py -a
env:
REFRESH_TOKENS: ${{ inputs.REFRESH_TOKENS }}
GP_TOKEN: ${{ inputs.GP_TOKEN }}
GITHUB_REPOS: ${{ github.repository }}
PUSH_TYPES: ${{ inputs.PUSH_TYPES }}
DO_NOT_REWARD: ${{ inputs.DO_NOT_REWARD }}
SERVERCHAN_SEND_KEY: ${{ inputs.SERVERCHAN_SEND_KEY }}
TELEGRAM_BOT_TOKEN: ${{ inputs.TELEGRAM_BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ inputs.TELEGRAM_CHAT_ID }}
PUSHPLUS_TOKEN: ${{ inputs.PUSHPLUS_TOKEN }}
PUSHPLUS_TOPIC: ${{ inputs.PUSHPLUS_TOPIC }}
SMTP_HOST: ${{ inputs.SMTP_HOST }}
SMTP_PORT: ${{ inputs.SMTP_PORT }}
SMTP_TLS: ${{ inputs.SMTP_TLS }}
SMTP_USER: ${{ inputs.SMTP_USER }}
SMTP_PASSWORD: ${{ inputs.SMTP_PASSWORD }}
SMTP_SENDER: ${{ inputs.SMTP_SENDER }}
SMTP_RECEIVER: ${{ inputs.SMTP_RECEIVER }}
FEISHU_WEBHOOK: ${{ inputs.FEISHU_WEBHOOK }}
WEBHOOK_URL: ${{ inputs.WEBHOOK_URL }}
CQHTTP_ENDPOINT: ${{ inputs.CQHTTP_ENDPOINT }}
CQHTTP_USER_ID: ${{ inputs.CQHTTP_USER_ID }}
CQHTTP_ACCESS_TOKEN: ${{ inputs.CQHTTP_ACCESS_TOKEN }}
branding:
icon: 'check-circle'
color: 'orange'