-
Notifications
You must be signed in to change notification settings - Fork 3
41 lines (35 loc) · 1003 Bytes
/
fetch.yaml
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
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