Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow to auto update specs #76

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions .github/workflows/update_specs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Update OpenAPI specs
on:
push:
branches:
- main

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: GitHub App token
id: github_app_token
uses: tibdex/github-app-token@v1.5.0
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780

- name: Checkout the repo
uses: actions/checkout@v3

- name: Build
run: ./gradlew build

- name: Move OpenAPI specs to root
run: mv build/smithyprojections/opensearch-api-specification/source/openapi/OpenSearch.openapi.json .

- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
token: ${{ steps.github_app_token.outputs.token }}
commit-message: Update OpenAPI specs
title: Update OpenAPI specs
body: |
I've noticed an update to the models. This pull request updates the OpenAPI specs accordingly.
branch: create-pull-request/specs-update