Automatically build Postman documentation #22
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Automatically build Postman documentation | |
on: | |
workflow_dispatch: | |
inputs: | |
versionName: | |
description: 'The new version name' | |
required: true | |
default: '1.0.0' | |
releaseNotes: | |
description: 'The new version release notes' | |
required: false | |
default: '' | |
jobs: | |
automated-api-tests: | |
runs-on: arc-runner-k8s | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
- name: Get OpenAPI schema | |
run: | | |
python main.py get-openapi | |
- name: Push OpenAPI to Postman | |
id: pushApi | |
uses: davidespihernandez/push-openapi-to-postman@v1 | |
with: | |
path-to-definition: ./openapi.json | |
postman-api-key: ${{ secrets.POSTMAN_API_KEY }} | |
api-id: ${{ secrets.POSTMAN_API_ID }} | |
api-path-to-file-name: openapi.json | |
version-name: ${{ github.event.inputs.versionName }} | |
release-notes: ${{ github.event.inputs.releaseNotes }} |