api: split pulling API changes and regenerating new API

For checking wether the api was tempered with, we need separate action,
that just checks the code against the currently pulled spec.

This introduces two subactions for `npx api`.
These are `npx api:generate` and `npx api:pull`.
This commit is contained in:
Ondrej Ezr 2024-01-23 10:07:27 +01:00 committed by Lucas Garfield
parent 82e096a19c
commit 25144511ad
5 changed files with 27 additions and 5 deletions

4
api/pull.sh Normal file
View file

@ -0,0 +1,4 @@
#!/bin/bash
# Download the most up-to-date imageBuilder.yaml file and overwrite the existing one
curl https://raw.githubusercontent.com/osbuild/image-builder/main/internal/v1/api.yaml -o ./api/schema/imageBuilder.yaml