-
Notifications
You must be signed in to change notification settings - Fork 4
51 lines (48 loc) · 1.51 KB
/
update-schema.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
name: Update schemas
on:
schedule:
# Daily
- cron: '0 0 * * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-odb-schema:
runs-on: ubuntu-latest
steps:
- name: Checkout current branch (full)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate token
id: generate-token
uses: tibdex/github-app-token@v2
with:
app_id: 206840
private_key: ${{ secrets.WORKFLOW_GH_TOKEN }}
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Fetch latest ODB schema
run: ./fetchODBSchema.mjs dev
env:
ODB_API_KEY: ${{ secrets.LUCUMA_DEV_API_KEY }}
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v6
with:
title: Update ODB Schema
commit-message: Update ODB Schema
committer: lucuma-steward[bot] <106720676+lucuma-steward[bot]@users.noreply.github.com>
author: lucuma-steward[bot] <106720676+lucuma-steward[bot]@users.noreply.github.com>
branch: steward/update-odb-schema
delete-branch: true
token: ${{ steps.generate-token.outputs.token }}
- name: Check Pull Request
run: |
echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}"
echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}"