mirror of
https://github.com/deepset-ai/haystack.git
synced 2026-01-03 10:38:13 +00:00
ci: Fix OpenAPI spec sync (#4254)
* Attempt to fix OpenAPI sync * Dry run * Add step to get OpenAPI specs id * Remove dryRun and branch trigger
This commit is contained in:
parent
c0c09f1287
commit
d594ab800b
17
.github/workflows/openapi_sync.yml
vendored
17
.github/workflows/openapi_sync.yml
vendored
@ -28,10 +28,25 @@ jobs:
|
||||
- name: Update OpenAPI specs
|
||||
run: python .github/utils/generate_openapi_specs.py
|
||||
|
||||
- name: Get OpenAPI specs id
|
||||
id: openapi-specs
|
||||
env:
|
||||
README_API_KEY: ${{ secrets.README_API_KEY }}
|
||||
run: |
|
||||
VERSION="$(cut -d "." -f 1,2 < VERSION.txt)"
|
||||
if [[ "$(cat VERSION.txt)" == *"rc0" ]]; then
|
||||
VERSION="$VERSION-unstable"
|
||||
fi
|
||||
SPECS_ID=$(curl https://dash.readme.com/api/v1/api-specification \
|
||||
-u "$README_API_KEY:" \
|
||||
--header "x-readme-version: $VERSION" \
|
||||
| jq -r ".[0].version")
|
||||
echo "id=$SPECS_ID" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Sync OpenAPI specs
|
||||
uses: readmeio/rdme@8.3.1
|
||||
env:
|
||||
README_API_KEY: ${{ secrets.README_API_KEY }}
|
||||
README_API_DEFINITION_ID: ${{ secrets.README_API_DEFINITION_ID }}
|
||||
README_API_DEFINITION_ID: ${{ steps.openapi-specs.outputs.id }}
|
||||
with:
|
||||
rdme: openapi openapi.json --key="$README_API_KEY" --id="$README_API_DEFINITION_ID"
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user