Skip to content

Commit 167a22b

Browse files
authored
DX-2454 Add Autogeneration Pipeline (#53)
1 parent fdc9793 commit 167a22b

File tree

2 files changed

+44
-0
lines changed

2 files changed

+44
-0
lines changed

.github/workflows/listener.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# Ingest repository_dispatch events and trigger appropriate actions
2+
name: Listener
3+
4+
on:
5+
repository_dispatch:
6+
types: [Build]
7+
workflow_dispatch:
8+
inputs:
9+
branch:
10+
description: 'Branch Name'
11+
required: true
12+
default: 'build-sdk-workflow-test'
13+
14+
jobs:
15+
build:
16+
if: ${{ github.event.action == 'Build' }}
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- name: Echo Event
22+
run: |
23+
echo "${{ toJson(github) }}"
24+
25+
- name: Build SDK and Open PR
26+
uses: Bandwidth/generate-sdk-action@DX-2454
27+
with:
28+
branch-name: ${{ github.event.client_payload.branchName }}
29+
username: ${{ secreats.DX_GITHUB_USERNAME }}
30+
token: ${{ secreats.DX_GITHUB_TOKEN }}
31+
language: python
32+
config: ./openapi-config.yml
33+
34+
- uses: ./.github/actions/add_pr_comment
35+
with:
36+
username: ${{ secrets.DX_GITHUB_USERNAME }}
37+
token: ${{ secrets.DX_GITHUB_TOKEN }}
38+
repo-name: api-specs
39+
pr-number: ${{ github.event.client_payload.prNumber }}
40+
message: 'Python SDK Built'

openapi-config.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
projectName: bandwidth-sdk
2+
packageName: bandwidth
3+
packageVersion: 14.0.0
4+
packageUrl: 'https://dev.bandwidth.com/sdks/python'

0 commit comments

Comments
 (0)