Skip to content

Get API Data From Airtable #476

Get API Data From Airtable

Get API Data From Airtable #476

Workflow file for this run

name: Get API Data From Airtable
on:
push:
schedule:
- cron: '0 0 * * *'
jobs:
get_data:
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the repo
- name: Check out code
uses: actions/checkout@v3
# Step 2: Install Node.js
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 18
# Step 3: Install dependencies
- name: Install dependencies
run: |
npm install
# Step 4: Run the script
- name: Get API Data
run: |
export NIGERIAN_BANKS_AIRTABLES="${{ secrets.NIGERIAN_BANKS_AIRTABLES }}"
node index.js
date > last_updated.txt
# Step 5: Push the data
- name: Push Data
run: |
git config --global user.name '${{ github.actor }}'
git config --global user.email '${{ github.actor }}@users.noreply.github.com'
git add -A
git commit -am "Fetch New Data"
git push