Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/update-schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
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: 24
cache: npm

- name: Install dependencies and fetch latest ODB schema
run: |
cd schemas
npm ci
./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 }}"
Loading