-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (46 loc) · 1.33 KB
/
generate_report.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
name: Generate Reports
on:
schedule:
- cron: '* 03 * * *'
workflow_dispatch:
env:
LOG_FILE: 'report.log'
jobs:
generate-reports:
runs-on: ubuntu-latest
strategy:
matrix:
Dataset: [bkm-book-dataset, kitap-yurdu-dataset]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.10.6
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pandas kaggle
- name: Kaggle Dataset Dawnload
env:
KAGGLE_USERNAME: ${{ secrets.KAGGLE_USERNAME }}
KAGGLE_KEY: ${{ secrets.KAGGLE_KEY }}
run: |
python Scripts/dataset_download.py --dataset_name furkanzeki/${{matrix.Dataset}}
- name: Generate Report
run: |
python Scripts/report.py
- name: Wait before commit and push
run: |
sleep $(( $RANDOM % 60 + 30 ))
- name: Commit and push changes
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
git pull origin main
git add Report/
git commit -m "Add Report File"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}