-
Notifications
You must be signed in to change notification settings - Fork 18
54 lines (49 loc) · 1.58 KB
/
run_daily.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
name: Get Daily
on:
workflow_dispatch:
env:
GITHUB_NAME: yihong0618
GITHUB_EMAIL: [email protected]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: My GitHub Status
uses: yihong0618/github-readme-stats@main
with:
TELEGRAM_TOKEN: ${{ secrets.TELE_TOKEN }}
TELEGRAM_CHAT_ID: ${{ secrets.TELE_CHAT_ID }}
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.6
- name: Configure pip cache
uses: actions/cache@v1
id: pip-cache
with:
path: venv
key: pip-1-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
if: steps.pip-cache.outputs.cache-hit != 'true'
- name: Generate new md
run: |
source venv/bin/activate
python get_daily.py ${{ secrets.DUOLINGO_USERNAME }} ${{ secrets.DUOLINGO_PASSWORD }} ${{ secrets.CICHANG_USERNAME }} ${{ secrets.CICHANG_PASSWORD }} ${{ secrets.G_T }} ${{ github.repository }}
- name: Push README
uses: github-actions-x/[email protected]
with:
github-token: ${{ secrets.G_T }}
commit-message: "Refresh README (2021 NUM Daily)"
files: README.md
rebase: "true"
name: ${{ env.GITHUB_NAME }}
email: ${{ env.GITHUB_EMAIL }}