-
-
Notifications
You must be signed in to change notification settings - Fork 151
37 lines (30 loc) · 1.26 KB
/
airtable_to_json.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
name: Convert Back-end Airtable to JSON file
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
jobs:
convert-airtable-to-json:
if: |
github.repository == 'ersilia-os/ersilia' &&
(github.event_name != 'pull_request' ||
github.event.pull_request.head.repo.full_name == github.repository)
runs-on: ubuntu-latest
steps:
- name: Checkout persist credentials
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # [email protected]
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Install dependencies
run: |
pip install pyairtable
pip install airtable-python-wrapper
pip install boto3
- name: Convert to backend of Airtable to JSON FILE
env:
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
run: |
python .github/scripts/convert_airtable_to_json.py $AIRTABLE_API_KEY $AWS_ACCESS_KEY_ID $AWS_SECRET_ACCESS_KEY