-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.44 KB
/
automatic-updates.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
name: Update series periodically or upon manual trigger
on:
workflow_dispatch:
schedule:
- cron: '0 0,12 * * *'
jobs:
update:
name: Update series
runs-on: ubuntu-latest
steps:
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y --no-install-recommends jq
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
#- name: Checkout twint
# uses: actions/checkout@v3
# with:
# repository: catgirl-v/twint
# path: twint
#- name: Install twint
# run: pip3 install -e .
# working-directory: twint
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: "pip"
- name: Install Python dependencies
run: pip install -r requirements.txt
- name: Run update script
env:
TWITTER_AUTH_TOKEN: ${{ secrets.TWITTER_AUTH_TOKEN }}
REDDIT_USER: ${{ secrets.REDDIT_USER }}
REDDIT_PASSWD: '${{ secrets.REDDIT_PASSWD }}'
REDDIT_ID: ${{ secrets.REDDIT_ID }}
REDDIT_SECRET: ${{ secrets.REDDIT_SECRET }}
run: ./update_series.sh
- name: Commit changes
run: |
git config --global user.name 'catgirl-bot'
git config --global user.email '<>'
git add series
git commit -m "Update index (beep boop)" || exit 0
git push