FIX: new swagger info

This commit is contained in:
Gabriel Rosa
2022-11-09 14:29:32 -03:00
parent 04edce0c56
commit b9439685f3
4 changed files with 6016 additions and 29 deletions
+10 -19
View File
@@ -6,7 +6,7 @@ on:
workflow_dispatch:
inputs:
environment:
description: 'Deployment environment'
description: "Deployment environment"
required: true
type: choice
options:
@@ -39,11 +39,11 @@ jobs:
new_release_version: ${{ (steps.semantic.outputs.new_release_published == 'true' && steps.semantic.outputs.new_release_version) || (github.event_name == 'workflow_dispatch' && '0.0.0') }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3
- if: github.event_name != 'workflow_dispatch'
name: Semantic Release
uses: cycjimmy/semantic-release-action@v2
uses: cycjimmy/semantic-release-action@v3
id: semantic
with:
semantic_version: 16
@@ -73,7 +73,7 @@ jobs:
if: ${{ github.event_name == 'workflow_dispatch' || needs.semantic_release.outputs.new_release_published == 'true' }}
needs: [extract_environment, semantic_release]
runs-on:
[self-hosted, '${{ needs.extract_environment.outputs.environment }}']
[self-hosted, "${{ needs.extract_environment.outputs.environment }}"]
steps:
- name: Checkout
@@ -145,12 +145,12 @@ jobs:
api_docs:
needs: [extract_environment, semantic_release, deploy]
runs-on:
[self-hosted, '${{ needs.extract_environment.outputs.environment }}']
[self-hosted, "${{ needs.extract_environment.outputs.environment }}"]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Extract Docs BlockId and PageId
- name: Extract Docs BlockId and PageId
env:
ENV: ${{ needs.extract_environment.outputs.environment }}
DEV_DOCS_BLOCK_ID: ${{ secrets.DEV_DOCS_BLOCK_ID }}
@@ -181,16 +181,7 @@ jobs:
DOCS_PAGE_ID: ${{ steps.extract_docs_info.outputs.page_id }}
DOCS_BLOCK_ID: ${{ steps.extract_docs_info.outputs.block_id }}
run: |
SWAGGER=`cat swagger.txt`
curl --request POST \
--url $DOCS_URL \
--header 'Content-Type: application/json' \
--data @<(cat <<EOF
{
"service": "$DOCS_API_TOKEN",
"pageId": "$DOCS_PAGE_ID",
"blockId": "$DOCS_BLOCK_ID",
"schema": $SWAGGER
}
EOF
)
sed -i -e "s/\${DOCS_API_TOKEN}/$DOCS_API_TOKEN/g" docsfera.json
sed -i -e "s/\${DOCS_PAGE_ID}/$DOCS_PAGE_ID/g" docsfera.json
sed -i -e "s/\${DOCS_BLOCK_ID}/$DOCS_BLOCK_ID/g" docsfera.json
curl -X POST -H 'Content-Type: application/json' -d @docsfera.json $DOCS_URL