-
Notifications
You must be signed in to change notification settings - Fork 2
38 lines (35 loc) · 1.13 KB
/
generate-sdk.yaml
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
name: Generate SDK Packages
on:
pull_request:
types:
- opened
- synchronize
permissions:
contents: write
jobs:
generate-js:
name: Generate JavaScript SDK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.ref }}
path: actions
- name: Build JavaScript SDK
uses: Kong/public-shared-actions/code-build-actions/build-js-sdk@main
with:
app_directory: ${{ github.workspace }}
sdk_output_directory: ${{ github.workspace }}/actions
token: ${{ secrets.GITHUB_TOKEN }}
- name: Commit SDK changes to the PR
shell: bash
working-directory: ${{ github.workspace }}/actions
env:
GH_TOKEN: ${{ secrets.PORTAL_JS_SDK_TOKEN }}
run: |
git config --global user.email "team-devx+github-bot@konghq.com"
git config --global user.name "team-devx"
gh pr checkout ${{ github.event.pull_request.number }}
git add src/
git commit --allow-empty -m "Update SDK based on openapi.yaml changes"
git push