Skip to content

Fetch Data

Fetch Data #596

Workflow file for this run

name: Fetch Data
on:
workflow_dispatch:
schedule:
- cron: "0 * * * *"
defaults:
run:
shell: bash
jobs:
on_schedule:
name: Scheduled Run
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
id: checkout-source
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- uses: 'google-github-actions/auth@v2'
with:
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
- name: Install dependencies
run: |
pip install -r src/requirements.txt
- name: fetch raw data
env:
SECRETS_VARS: ${{ secrets.GOOGLE_CREDENTIALS }}
run: |
echo "$SECRETS_VARS" > google_credential.json
python src/weather_data_loader.py
- name: Clean up
if: always()
run: |
rm -f google_credential.json || true