forked from Vu1nT0tal/yarb
-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (49 loc) · 1.55 KB
/
action.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
# https://docs.github.com/cn/actions/automating-builds-and-tests/building-and-testing-python
name: Update dailynews
# 国际标准时间2点(北京时间10点)
on:
schedule:
- cron: '0 2 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.x'
- name: Install dependencies
run: ./install.sh
- name: Push articles
env:
FEISHU_KEY: ${{ secrets.FEISHU_KEY }}
WECOM_KEY: ${{ secrets.WECOM_KEY }}
DINGTALK_KEY: ${{ secrets.DINGTALK_KEY }}
QQ_KEY: ${{ secrets.QQ_KEY }}
TELEGRAM_KEY: ${{ secrets.TELEGRAM_KEY }}
MAIL_KEY: ${{ secrets.MAIL_KEY }}
MAIL_RECEIVER: ${{ secrets.MAIL_RECEIVER }}
run: python3 yarb.py
- name: Commit
run: |
git diff
git config --global user.email [email protected]
git config --global user.name firmianay
git add archive today.md
git commit -m "每日安全资讯(`date +'%Y-%m-%d'`)"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ github.token }}
del_runs:
runs-on: ubuntu-latest
steps:
- name: Delete workflow runs
uses: Mattraks/delete-workflow-runs@v2
with:
token: ${{ github.token }}
repository: ${{ github.repository }}
retain_days: 7
keep_minimum_runs: 7