diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d99f529..bad5bca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,17 +16,14 @@ jobs: - name: Read schema.yml and fetch file id: fetch-file run: | - sudo apt-get install jq - CONTENT=$(cat Fastbot/schema.yml) - echo "$CONTENT" | jq -r '.config.path' - # CONFIG_PATH=$(echo "$CONTENT" | jq -r '.config.path') - # CONFIG_BRANCH=$(echo "$CONTENT" | jq -r '.config.branch') - # sudo apt-get install -y jq - # CONTENT=$(cat Fastbot/schema.yml) - # echo "Path: $CONFIG_PATH" - # echo "Branch: $CONFIG_BRANCH" - # JSON_FILE_URL="https://raw.githubusercontent.com/$CONFIG_PATH/$CONFIG_BRANCH/schema.json" - # curl -sS "$JSON_FILE_URL" > temp.json + sudo apt-get install -y jq + CONTENT=$(cat Fastbot/schema_dir.json) + CONFIG_PATH=$(echo "$CONTENT" | jq -r '.config.path') + CONFIG_BRANCH=$(echo "$CONTENT" | jq -r '.config.branch') + echo "Path: $CONFIG_PATH" + echo "Branch: $CONFIG_BRANCH" + JSON_FILE_URL="https://raw.githubusercontent.com/$CONFIG_PATH/$CONFIG_BRANCH/schema.json" + curl -sS "$JSON_FILE_URL" > temp.json - uses: InoUno/yaml-ls-check@develop with: diff --git a/Fastbot/schema.yml b/Fastbot/schema.yml deleted file mode 100644 index 76e1b3c..0000000 --- a/Fastbot/schema.yml +++ /dev/null @@ -1,3 +0,0 @@ -config: - path: 2060-io/fastbot-conversational-schema - branch: fastbot-1.0 diff --git a/Fastbot/schema_dir.json b/Fastbot/schema_dir.json new file mode 100644 index 0000000..a6b723b --- /dev/null +++ b/Fastbot/schema_dir.json @@ -0,0 +1,6 @@ +{ + "config": { + "path": "2060-io/fastbot-conversational-schema", + "branch": "fastbot-1.0" + } +} \ No newline at end of file diff --git a/README.md b/README.md index c305921..8e212cb 100644 --- a/README.md +++ b/README.md @@ -6,5 +6,5 @@ This is an open-source project that manages various templates for deploying serv - If you wish to contribute to the templates, create a pull request. After undergoing validation for consistency with the template version, it will be added to the repository. -- It's important to note that the template file for Fastbots includes a 'config.yml' file. This file contains the generic deployment used by the project. Since this project aims to create custom chatbots, this file can be highly parameterized according to your needs. If you require a personalized chatbot, feel free to fork this repository and customize the file. Additionally, note that the 'schema.yml' file in this project contains the validation schema applied to 'config.yml'. It ensures necessary tests are conducted to validate its consistency. +- It's important to note that the template file for Fastbots includes a `config.yml` file. This file contains the generic deployment used by the project. Since this project aims to create custom chatbots, this file can be highly parameterized according to your needs. If you require a personalized chatbot, feel free to fork this repository and customize the file. Additionally, note that the `schema.yml` file in this project contains the validation schema applied to `config.yml`. It ensures necessary tests are conducted to validate its consistency.