-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.78 KB
/
every_four_hours.yml
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
51
52
53
54
name: Every 4 Hours (Schema, Local Copies, Permissions, All Donations & All Matching)
on:
schedule:
# Runs every four hours
- cron: '0 */4 * * *'
workflow_dispatch:
permissions:
contents: write # Needed for committing back to the repo
jobs:
run-script:
runs-on: ubuntu-latest
env:
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_Port }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
INDEXER_DB_HOST: ${{ secrets.INDEXER_DB_HOST }}
INDEXER_DB_PORT: ${{ secrets.INDEXER_DB_PORT }}
INDEXER_DB_NAME: ${{ secrets.INDEXER_DB_NAME }}
INDEXER_DB_USER: ${{ secrets.INDEXER_DB_USER }}
INDEXER_DB_PASSWORD: ${{ secrets.INDEXER_DB_PASSWORD }}
MACI_DB_HOST: ${{ secrets.MACI_DB_HOST }}
MACI_DB_PORT: ${{ secrets.MACI_DB_PORT }}
MACI_DB_NAME: ${{ secrets.MACI_DB_NAME }}
MACI_DB_USER: ${{ secrets.MACI_DB_USER }}
MACI_DB_PASSWORD: ${{ secrets.MACI_DB_PASSWORD }}
GOOGLE_CREDENTIALS: ${{ secrets.GOOGLE_CREDENTIALS }}
DUNE_API_KEY: ${{ secrets.DUNE_API_KEY }}
DB_FDW_USERS: ${{ secrets.DB_FDW_USERS }}
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Update Foreign Schema
run: python automations/update_foreign_schema.py
timeout-minutes: 55
- name: Update Materialized Views
run: python automations/update_materialized_views.py
timeout-minutes: 55
- name: Update Permissions
run: python automations/create_foreign_data_users.py
timeout-minutes: 55