-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (39 loc) · 1.16 KB
/
main.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
name: Run Synternet Data Layer
on:
schedule:
- cron: '30 22 * * *' # Runs daily at 23.15 CET
workflow_dispatch: # Allows manual trigger
permissions:
contents: write
jobs:
run-script:
runs-on: ubuntu-latest
environment: prod
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Synternet Data Layer
run: python SYNTERNET_DATA_LAYER.py
continue-on-error: true
env:
API_KEY: ${{ secrets.API_KEY }}
API_URL: ${{ secrets.API_URL }}
CSV_DIRECTORY: ${{ github.workspace }}/data
- name: Wait and Retry if Failed
if: failure()
uses: nick-invision/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: SYNTERNET_DATA_LAYER.py
env:
API_KEY: ${{ secrets.API_KEY }}
API_URL: ${{ secrets.API_URL }}
CSV_DIRECTORY: ${{ github.workspace }}/data