Skip to content

Sync release version with OpenAPI docs #17

Sync release version with OpenAPI docs

Sync release version with OpenAPI docs #17

# This workflow will open a PR in https://github.com/instill-ai/protobufs
# updating the API version in the OpenAPI specifications.
name: Sync release version with OpenAPI docs
on:
release:
types: [published]
permissions:
contents: read
jobs:
update-api-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout protobufs repository
uses: actions/checkout@v4
with:
repository: instill-ai/protobufs
token: ${{ secrets.botGitHubToken }}
- name: Modify the API version in OpenAPI configuration
run: |
# On release triggers, GITHUB_REF_NAME is the release name (e.g.
# 'v0.10.0-beta')
sed -i "s/version: \".*\"/version: \"${GITHUB_REF_NAME}\"/" common/openapi/v1beta/api_info.conf
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.botGitHubToken }}
commit-message: 'chore: update API version'
title: 'docs(openapi): Update API version'
body: Sync API version with latest Core release
branch: chore/update-api-version
base: main
draft: false