Skip to content

OpenAPI action

OpenAPI action #1

Workflow file for this run

name: Update OpenAPI
on:
push:
tags:
- '*'
branches:
- '**'
jobs:
update-openapi:

Check failure on line 11 in .github/workflows/build_openapi.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_openapi.yaml

Invalid workflow file

You have an error in your yaml syntax on line 11
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x' # specify the Python version you need
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r example/requirements.txt # if you have a requirements file
- name: Run script to generate OpenAPI JSON
run: python example/create_openapi.py
- name: Create a new release
id: create_release
uses: softprops/action-gh-release@v2
with:
files: docs/openapi/openapi.json
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.sha }}
release_name: 'Release ${{ github.sha }}'
draft: false
prerelease: false
# - name: Upload OpenAPI JSON as an artifact
# uses: actions/upload-artifact@v4
# with:
# name: openapi.json
# path: ./docs/openapi/openapi.json