Data Processing Pipeline #13
This file contains hidden or 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: Data Processing Pipeline | |
on: | |
schedule: | |
# Run every 6 hours (at 00:00, 06:00, 12:00, 18:00 UTC) | |
- cron: '0 */6 * * *' | |
workflow_dispatch: | |
inputs: | |
run_bridge_data: | |
description: 'Run bridge data processing' | |
required: false | |
default: 'true' | |
type: boolean | |
run_musd_data: | |
description: 'Run MUSD data processing' | |
required: false | |
default: 'true' | |
type: boolean | |
env: | |
PYTHON_VERSION: '3.11' | |
jobs: | |
process-bridge-data: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_bridge_data == 'true') | |
steps: | |
- name: π Checkout repository | |
uses: actions/checkout@v4 | |
- name: π Set up Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: π¦ Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: π Process Bridge Data | |
env: | |
SUPABASE_URL_PROD: ${{ secrets.SUPABASE_URL_PROD }} | |
SUPABASE_KEY_PROD: ${{ secrets.SUPABASE_KEY_PROD }} | |
SUPABASE_DATA_URL: ${{ secrets.SUPABASE_DATA_URL }} | |
SUPABASE_DATA_KEY: ${{ secrets.SUPABASE_DATA_KEY }} | |
COINGECKO_KEY: ${{ secrets.COINGECKO_KEY }} | |
run: | | |
echo "π Starting bridge data processing..." | |
python scripts/process_bridge_data.py | |
echo "β Bridge data processing completed" | |
process-musd-data: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_musd_data == 'true') | |
steps: | |
- name: π Checkout repository | |
uses: actions/checkout@v4 | |
- name: π Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
cache: 'pip' | |
- name: π¦ Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: π° Process MUSD Data | |
env: | |
SUPABASE_URL_PROD: ${{ secrets.SUPABASE_URL_PROD }} | |
SUPABASE_KEY_PROD: ${{ secrets.SUPABASE_KEY_PROD }} | |
SUPABASE_DATA_URL: ${{ secrets.SUPABASE_DATA_URL }} | |
SUPABASE_DATA_KEY: ${{ secrets.SUPABASE_DATA_KEY }} | |
COINGECKO_KEY: ${{ secrets.COINGECKO_KEY }} | |
run: | | |
echo "π Starting MUSD data processing..." | |
python scripts/process_musd_data.py | |
echo "β MUSD data processing completed" |