-
Notifications
You must be signed in to change notification settings - Fork 62
42 lines (36 loc) · 1.52 KB
/
build-openapi-specs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build OpenAPI specs
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- 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/full/openapi/OpenSearch.openapi.json .
- name: Upload OpenAPI model artifact
uses: actions/upload-artifact@v3
with:
name: opensearch-openapi
path: ./OpenSearch.openapi.json
- name: GitHub App token
id: github_app_token
uses: tibdex/[email protected]
if: github.repository == 'opensearch-project/opensearch-api-specification' && github.event_name == 'push' && github.event.ref == 'refs/heads/main'
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: 22958780
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
if: github.repository == 'opensearch-project/opensearch-api-specification' && github.event_name == 'push' && github.event.ref == 'refs/heads/main'
with:
token: ${{ steps.github_app_token.outputs.token }}
commit-message: Update OpenAPI specs
signoff: true
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