-
Notifications
You must be signed in to change notification settings - Fork 61
47 lines (41 loc) · 1.6 KB
/
build-single-file-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
43
44
45
46
47
name: Build latest single-file specs
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
- name: Build
working-directory: ./tools
run: |-
npm install
npm run merge
- name: Upload OpenAPI model artifact
uses: actions/upload-artifact@v3
with:
name: opensearch-openapi
path: ./builds/OpenSearch.latest.yaml
- 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: Build latest single-file specs
signoff: true
title: Build latest single-file specs
body: |
I've noticed an update in the `./spec` folder. This pull request updates `./build/OpenSearch.latest.yaml` accordingly.
branch: create-pull-request/single-file-specs