-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (50 loc) · 1.61 KB
/
airtable.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build from AirTable
on:
workflow_dispatch:
schedule:
- cron: '0 10 * * *'
jobs:
build:
name: Build and pull request
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- name: Build
run: |
npm ci
npm run build
npm run build:dictionary
npm run build:alphabet
env:
AIRTABLE_API_KEY: ${{ secrets.AIRTABLE_API_KEY }}
AZURE_SUBSCRIPTION_KEY: ${{ secrets.AZURE_SUBSCRIPTION_KEY }}
AZURE_REGION: ${{ secrets.AZURE_REGION }}
- name: Check if there is any change
id: changes
run: echo "changed=$(git status --porcelain | wc -l)" >> $GITHUB_OUTPUT
- name: Commit changes
if: steps.changes.outputs.changed != 0
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git add data
git commit -m "Updated data from AirTable state at `date +'%d.%m %H:%M'`"
# https://github.com/marketplace/actions/create-pull-request
- name: Create Pull Request
if: steps.changes.outputs.changed != 0
uses: peter-evans/create-pull-request@v4
env:
GITHUB_TOKEN: ${{ secrets.ACTIONS_TOKEN }}
with:
base: main
delete-branch: true
add-paths: data
branch: airtable
title: Airtable update
reviewers: met,pionl