From e2dba6b84edcbcf9c61d8010f286c417f1fd5449 Mon Sep 17 00:00:00 2001 From: Mauro Morales Date: Thu, 16 Feb 2023 11:46:48 +0100 Subject: [PATCH] wrench: Automatically create a PR to publish latest schema release on the website (#899) * Add earthly target to generate cloud config schema Signed-off-by: Mauro Morales * Add schema workflow Signed-off-by: Mauro Morales --------- Signed-off-by: Mauro Morales --- Earthfile | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Earthfile b/Earthfile index 6be4ee5..342fb4c 100644 --- a/Earthfile +++ b/Earthfile @@ -705,3 +705,13 @@ temp-image: FROM +docker SAVE IMAGE --push $TTL_IMAGE +generate-schema: + FROM alpine + COPY . ./ + COPY +version/VERSION ./ + COPY +build-kairos-agent/kairos-agent /usr/bin/kairos-agent + ARG RELEASE_VERSION=$(cat VERSION) + RUN mkdir "docs/static/$RELEASE_VERSION" + ARG SCHEMA_FILE="docs/static/$RELEASE_VERSION/cloud-config.json" + RUN kairos-agent print-schema > $SCHEMA_FILE + SAVE ARTIFACT ./docs/static/* AS LOCAL docs/static/