-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (35 loc) · 928 Bytes
/
fetch.yaml
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
48
49
50
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