-
-
Notifications
You must be signed in to change notification settings - Fork 34
58 lines (48 loc) · 1.49 KB
/
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
57
58
name: Generate Report
on:
push:
schedule:
- cron: '15 1 1-20 1,4,7,10 *'
- cron: '15 5 1-20 1,4,7,10 *'
- cron: '15 9 1-20 1,4,7,10 *'
- cron: '15 13 1-20 1,4,7,10 *'
- cron: '15 17 1-20 1,4,7,10 *'
- cron: '15 21 1-20 1,4,7,10 *'
- cron: '15 23 1-20 1,4,7,10 *'
workflow_dispatch:
jobs:
generate-report:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: |
pip install --upgrade pip
pip install pipenv
pipenv sync --system
pip install -r requirements.txt
- name: Set PYTHONPATH
run: echo "PYTHONPATH=./scripts" >> $GITHUB_ENV
- name: Run report script
run: |
python scripts/3-report/gcs_reports.py
- name: Fetch and merge changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/shared.py --operation fetch_and_merge --branch fetch-automation
- name: Add and commit changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/shared.py --operation add_and_commit --message "Automated data report and commit"
- name: Push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
python scripts/shared.py --operation push