-
Notifications
You must be signed in to change notification settings - Fork 38
49 lines (47 loc) · 1.45 KB
/
cron.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
name: Cron Action
on:
workflow_dispatch:
schedule:
- cron: '0 */1 * * *'
jobs:
rss2telegram:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Download artifact
id: download
continue-on-error: true
uses: dawidd6/action-download-artifact@v6
with:
workflow: cron.yml
workflow_conclusion: success
- name: Move database
continue-on-error: true
run: mv rss2telegram/rss2telegram.db rss2telegram.db
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
- name: Install Requirements
run: pip install -r requirements.txt
- name: Run Rss to Telegram
run: python rss2telegram.py
env:
BOT_TOKEN: ${{ secrets.BOT_TOKEN }}
DESTINATION: ${{ vars.DESTINATION }}
URL: ${{ vars.URL }}
EMOJIS: ${{ vars.EMOJIS }}
TOPIC: ${{ vars.TOPIC }}
HIDE_BUTTON: ${{ vars.HIDE_BUTTON }}
MESSAGE_TEMPLATE: ${{ vars.MESSAGE_TEMPLATE }}
BUTTON_TEXT: ${{ vars.BUTTON_TEXT }}
PARAMETERS: ${{ vars.PARAMETERS }}
TELEGRAPH_TOKEN: ${{ vars.TELEGRAPH_TOKEN }}
DRYRUN: ${{ steps.download.outcome }}
- name: Upload history
uses: actions/upload-artifact@v4
with:
name: rss2telegram
path: rss2telegram.db