-
Notifications
You must be signed in to change notification settings - Fork 49
46 lines (38 loc) · 1.18 KB
/
run.yml
File metadata and controls
46 lines (38 loc) · 1.18 KB
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
name: Run Daily Actions
on:
schedule:
# every day 8 a.m. (UTC time 00:00, Beijing time 08:00)
- cron: '0 0 * * *'
workflow_dispatch: # Allow manual trigger
jobs:
run-actions:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Setup Git
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
# - name: Run V2EX checkin script
# env:
# V2EX_COOKIES: ${{ secrets.V2EX_COOKIES }}
# run: |
# python v2ex/v2ex.py
- name: Run Telegram notification
env:
TELEGRAM_TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }}
run: |
python telegram/notify.py
- name: Commit and push
run: |
git add .
git commit -m "Successfully run $(date +"%Y-%m-%d %H:%M:%S")"
git push