-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.32 KB
/
update.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
name: Mirror Airtable data
on:
schedule:
- cron: "0 8 * * *" #update every day at 8AM
workflow_dispatch:
jobs:
scrape:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v2
- name: Install package manager for deps
run: pipx install pipenv
- uses: actions/setup-python@v2
with:
python-version: "3.11"
cache: "pipenv"
- name: Install deps
run: pipenv install
- name: Add IP address to trusted source (managed database)
uses: GarreauArthur/manage-digital-ocean-managed-database-trusted-sources-gh-action@main
with:
action: "add"
database_id: ${{ secrets.DATABASE_ID }}
digitalocean_token: ${{ secrets.DIGITALOCEAN_TOKEN }}
- name: Make that mirror, please
env:
AIRTABLE_BASE_ID: ${{ secrets.AIRTABLE_BASE_ID }}
AIRTABLE_KEY: ${{ secrets.AIRTABLE_KEY }}
SUPABASE_DATABASE_URL: ${{ secrets.SUPABASE_DATABASE_URL }}
run: pipenv run python mirror.py
- name: Remove IP address to trusted source (managed database)
uses: GarreauArthur/manage-digital-ocean-managed-database-trusted-sources-gh-action@main
with:
action: "remove"
database_id: ${{ secrets.DATABASE_ID }}
digitalocean_token: ${{ secrets.DIGITALOCEAN_TOKEN }}