Skip to content

Generate Schemas

Generate Schemas #1720

Workflow file for this run

name: Generate Schemas
on:
schedule:
- cron: '0 0/6 * * *' # Top of every 6th hour (e.g. 6:00)
workflow_call:
workflow_dispatch:
jobs:
build:
name: Generate
runs-on: ubuntu-22.04
permissions:
pull-requests: write
contents: write
steps:
- name: Pick Base Branch
id: branch_pick
run: |
if git ls-remote --exit-code --heads https://github.com/robere2/starboard schemas/patch; then
echo "BRANCH=schemas/patch" >> $GITHUB_OUTPUT
echo "Using branch \"schemas/patch\""
else
echo "BRANCH=master" >> $GITHUB_OUTPUT
echo "Using branch \"master\""
fi
shell: bash
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: "0"
ref: ${{ steps.branch_pick.outputs.BRANCH }}
- name: Setup Environment
uses: ./.github/actions/setup
- name: Generate Schemas
run: lerna run generate --scope @mcsb/schemas
env:
HYPIXEL_GEN_API_KEY: ${{ secrets.HYPIXEL_GEN_API_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
branch: schemas/patch
base: master
commit-message: 'chore(schemas): compile schemas'
author: 'GitHub <[email protected]>'
labels: 'Module: Schemas'
reviewers: robere2
delete-branch: true
title: '[Automated] JSON schema updates'
body: |
Changes were detected in the Hypixel API. This PR includes recommended changes. This system is still
experimental, so all changes should be reviewed before merging.
keepalive-job:
name: Keepalive Workflow
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: actions/checkout@v4
- uses: gautamkrishnar/keepalive-workflow@v2