Run Synternet Data Layer #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |