Skip to content

Convert Back-end Airtable to JSON file #105

Convert Back-end Airtable to JSON file

Convert Back-end Airtable to JSON file #105

name: Convert Back-end Airtable to JSON file
on:
workflow_dispatch:
schedule:
- cron: '0 2 * * *'
jobs:
convert-airtable-to-json:
if: |
github.repository == 'example/example_repo' &&
(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@692973e3d937129bcbf40652eb9f2f61becf3332 # pin@v3.5.3
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