-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (74 loc) · 2.34 KB
/
crawl.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
name: Crawl movies and tvshows
on:
repository_dispatch:
workflow_dispatch:
inputs:
tags:
description: 'Start crawling'
jobs:
job1:
name: crawling
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
- uses: FedericoCarboni/setup-ffmpeg@v2
id: setup-ffmpeg
- name: use kodi-metadata-tmdb-cli
working-directory: kodi-tmdb
env:
KODI_TMDB_CONFIG: ${{ secrets.KODI_TMDB_CONFIG }}
run: |
python handle_config.py $KODI_TMDB_CONFIG
chmod +x kodi-tmdb-linux-amd64
./kodi-tmdb-linux-amd64 &
echo 'kodi-tmdb is started!'
- name: pull
run: |
git checkout .
git pull --allow-unrelated-histories
- name: execute
id: execute
env:
ALIGO_TOKEN: ${{ secrets.ALIGO_TOKEN }}
QQ_SMTP_PASSWORD: ${{ secrets.QQ_SMTP_PASSWORD }}
run: |
python main.py $ALIGO_TOKEN $QQ_SMTP_PASSWORD
- 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: 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: Crawling%20result
body: Crawling%20success
sound: calypso
run: |
curl -L "${{env.host}}/${{env.key}}/${{env.title}}/${{env.body}}?sound=${{env.sound}}"