haystack/.github/workflows/pipeline_schema.yml
Sara Zan f377b78263
refactor: replace YAML schema check with a dispatch call (#3482)
* Replace yaml check with a dispatch call

* split workflow

* add branch for testing

* access secrets properly

* remove testing branch trigger
2022-10-28 10:48:59 +02:00

24 lines
718 B
YAML

name: YAML Schema
on:
workflow_dispatch: # Activate this workflow manually
push:
branches:
- main
jobs:
run:
runs-on: ubuntu-latest
steps:
# Start a workflow in https://github.com/deepset-ai/haystack-json-schema
# https://docs.github.com/en/rest/repos/repos#create-a-repository-dispatch-event
- name: Dispatch to schemas repository
run: |
curl \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.HAYSTACK_BOT_TOKEN }}" \
https://api.github.com/repos/deepset-ai/haystack-json-schema/dispatches \
-d '{"event_type":"generate-pipeline-schemas","client_payload":{}}'