-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (46 loc) · 1.25 KB
/
run.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: Run CI
on:
push:
branches:
- master
schedule:
- cron: '0 * * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout codes
uses: actions/checkout@v3
- name: Set up Python 3.8
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: Install system dependencies
run: sudo apt install jq curl
- name: Cache python dependencies
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install python dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Get previous rss_database.csv
uses: dawidd6/action-download-artifact@v6
with:
skip_unpack: true
if_no_artifact_found: ignore
- name: Run code
env:
CONSUMER_KEY: ${{ secrets.CONSUMER_KEY }}
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
python main.py
- name: Upload rss_database.csv
uses: actions/upload-artifact@v3
with:
name: rss_database
path: rss_database.csv