Skip to content

docs: update roadmap and distributions for April 2026 (#10367) #626

docs: update roadmap and distributions for April 2026 (#10367)

docs: update roadmap and distributions for April 2026 (#10367) #626

name: Generate Spiceschema OpenAPI
on:
push:
branches: [trunk]
paths:
- 'tools/spiceschema/**'
- 'crates/**'
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
CARGO_INCREMENTAL: 0
CARGO_NET_GIT_FETCH_WITH_CLI: true
jobs:
generate_openapi:
runs-on: self-hosted
steps:
- name: Check out repository
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Check for existing PR
id: check_pr
run: |
existing_pr=$(gh pr list \
--base trunk \
--json title,headRefName \
--jq '.[] | select(.title=="Update openapi.json")')
if [ ! -z "$existing_pr" ]; then
echo "An existing PR for updating openapi.json was found. Skipping updates."
echo "skip=true" >> "$GITHUB_OUTPUT"
else
echo "skip=false" >> "$GITHUB_OUTPUT"
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install Rust 1.94.1
if: steps.check_pr.outputs.skip != 'true'
run: rustup toolchain install 1.94.1 --profile minimal
- name: Set up make
if: runner.os != 'macOS' && steps.check_pr.outputs.skip != 'true'
uses: ./.github/actions/setup-make
- name: Set up cc
if: runner.os != 'macOS' && steps.check_pr.outputs.skip != 'true'
uses: ./.github/actions/setup-cc
- name: Build Cargo project
if: steps.check_pr.outputs.skip != 'true'
run: cargo build --manifest-path tools/spiceschema/Cargo.toml
- name: Run Cargo project to generate OpenAPI
if: steps.check_pr.outputs.skip != 'true'
run: cargo run --manifest-path tools/spiceschema/Cargo.toml -- http --json > .schema/openapi.json
- name: Verify OpenAPI file
if: steps.check_pr.outputs.skip != 'true'
run: |
if [ -f ".schema/openapi.json" ]; then
echo ".schema/openapi.json file was successfully created."
cat .schema/openapi.json
else
echo ".schema/openapi.json file was not created."
exit 1
fi
- name: Upload OpenAPI artifact
if: steps.check_pr.outputs.skip != 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openapi.json
path: .schema/openapi.json
- name: Create PR if needed
if: steps.check_pr.outputs.skip != 'true'
run: |
git config --global user.name 'Spice Schema Bot'
git config --global user.email 'schema-bot@spice.ai'
git checkout -b openapi/${GITHUB_RUN_ID}
if git diff --exit-code -- .schema/openapi.json; then
echo "No changes detected"
else
git add .schema/openapi.json
git commit -m "Update openapi.json"
git push origin openapi/${GITHUB_RUN_ID}
gh pr create \
--title "Update openapi.json" \
--body $'Updated OpenAPI specification\n\n**Remember**\n- [ ] Updated in [spiceai/docs](https://github.com/spiceai/docs).' \
--label 'kind/documentation' \
--base trunk \
--head openapi/${GITHUB_RUN_ID}
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}