Skip to content

Scheduled - StatusPage Backoffice Maintenance Aggregated - Daily Script Execution #8

Scheduled - StatusPage Backoffice Maintenance Aggregated - Daily Script Execution

Scheduled - StatusPage Backoffice Maintenance Aggregated - Daily Script Execution #8

name: Scheduled - StatusPage Backoffice Maintenance Aggregated - Daily Script Execution
# Imposta il workflow per essere eseguito ogni giorno alle 00:00 UTC
on:
schedule:
- cron: '0 1 * * *'
workflow_dispatch: # Permette di eseguire manualmente il workflow
jobs:
run-script:
runs-on: ubuntu-latest
steps:
# Checkout del repository
- name: Checkout repository
uses: actions/checkout@v3
# Imposta Python
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
# Installa le dipendenze (se presenti)
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install requests
# Esegui lo script Python
- name: Run the Python script
env:
BETTERSTACK_TOKEN: ${{ secrets.BETTER_STACK_TOKEN }}
PAGOPA_SUBSCRIPTION_KEY: ${{ secrets.PAGOPA_BACKOFFICE_API_KEY_PROD }}
PAGOPA_SUBSCRIPTION_KEY_GET_PA: ${{ secrets.PAGOPA_BACKOFFICE_API_KEY_GET_PA_PROD }}
run: |
python src/main/scripts/station-maintenance-aggregated.py