Skip to content

Update schemas

Update schemas #331

Workflow file for this run

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 }}"