-
Notifications
You must be signed in to change notification settings - Fork 0
88 lines (78 loc) · 2.47 KB
/
auto_sign.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
# 阿里云盘自动签到
name: Auto Sign In Aliyunpan
on:
repository_dispatch:
types:
- auto sign in
workflow_dispatch:
inputs:
tags:
description: 'Start sign in'
jobs:
job1:
name: sign in
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
with:
persist-credentials: false
fetch-depth: 0
- name: prepare python environment(v3.11)
uses: actions/setup-python@v4
with:
python-version: '3.11'
cache: 'pip'
- name: pip install
run: pip install -r requirements.txt
- name: pull
run: |
git checkout .
git pull --allow-unrelated-histories
- name: execute
id: execute
env:
ALIGO_TOKEN: ${{ secrets.ALIGO_TOKEN }}
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
GH_BOT_CHAT_ID: ${{ secrets.GH_BOT_CHAT_ID }}
GH_TOKEN: ${{ secrets.GH_TOKEN }}
run: |
python auto_check_in.py $ALIGO_TOKEN
- name: 更新ALIGO_TOKEN
uses: jon-grey/github-actions-secrets-creator@v1
if:
# 如果${{ steps.execute.outputs.aligo_token }}存在
steps.execute.outputs.aligo_token
with:
location: nichuanfang/movie-tvshow-spider
name: ALIGO_TOKEN
value: ${{ steps.execute.outputs.aligo_token }}
pa_token: ${{ secrets.GH_TOKEN }}
- name: 更新ALIGO_TOKEN(TRAKT)
uses: jon-grey/github-actions-secrets-creator@v1
if:
# 如果${{ steps.execute.outputs.aligo_token }}存在
steps.execute.outputs.aligo_token
with:
location: nichuanfang/trakt
name: ALIGO_TOKEN
value: ${{ steps.execute.outputs.aligo_token }}
pa_token: ${{ secrets.GH_TOKEN }}
- name: keep alive
uses: Smart-Transportation/[email protected]
continue-on-error: true
with:
github_token: ${{ secrets.GH_TOKEN }}
branch: 'main'
author_email: '[email protected]'
author_name: 'nichuanfang'
message: '🐳 chore: keep action alive'
# BARK通知 可选
- name: Push notification
env:
key: ${{ secrets.BARK_KEY }}
host: ${{ vars.BARK_HOST }}
title: Signin%20result
body: Signin%20success
sound: calypso
run: |
curl -L "${{env.host}}/${{env.key}}/${{env.title}}/${{env.body}}?sound=${{env.sound}}"