mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-05 11:38:20 +00:00
* ci: trigger schema update after docker image release * fix: use HAYSTACK_BOT_TOKEN secret in pipeline_schema workflow
39 lines
1.3 KiB
YAML
39 lines
1.3 KiB
YAML
name: YAML Schema
|
|
run-name: Update schema for ref ${{ github.event.workflow_run.head_branch || inputs.ref || 'main' }}
|
|
|
|
on:
|
|
workflow_dispatch: # Activate this workflow manually
|
|
inputs:
|
|
ref:
|
|
description: Tag or branch name of Haystack version
|
|
required: true
|
|
type: string
|
|
default: main
|
|
|
|
workflow_run:
|
|
workflows:
|
|
- Docker image release
|
|
types:
|
|
- completed
|
|
|
|
env:
|
|
HAYSTACK_REF: ${{ github.event.workflow_run.head_branch || inputs.ref || 'main' }}
|
|
|
|
jobs:
|
|
|
|
run:
|
|
name: Update schema for ref ${{ github.event.workflow_run.head_branch || inputs.ref || 'main' }}
|
|
if: ${{ !github.event.workflow_run || github.event.workflow_run.conclusion == 'success' }}
|
|
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 with ref "${{ env.HAYSTACK_REF }}"'
|
|
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":{"ref":"${{ env.HAYSTACK_REF }}"}}'
|