forked from karenyrx/opensearch-protos
-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (49 loc) · 1.61 KB
/
convert-proto.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Proto Convert
on:
workflow_dispatch:
inputs:
input_param:
description: 'Description of the input parameter'
required: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Download Release Assets
uses: robinraju/release-downloader@v1
with:
repository: 'lucy66hw/opensearch-api-specification'
latest: true
fileName: 'opensearch-openapi.yaml'
tag: 'main-latest'
token: ${{ secrets.OAS_PAT }}
preRelease: true
- name: List Downloaded Files
run: ls -R $GITHUB_WORKSPACE
- name: Run Proto Conversion
run: npm ci && npm run convert-proto
- name: Clone Protobuf Generator Repository
run: git clone --branch aggregate_protos https://github.com/lucy66hw/openapi-generator.git cloned-repo
- name: Build Protobuf Generator Tool
run: |
cd cloned-repo
./mvnw clean package install -DskipTests
- name: Convert protobuf
run: |
java -jar cloned-repo/modules/openapi-generator-cli/target/openapi-generator-cli.jar generate -c tools/src/proto/protobuf-generator-config.yaml
- name: Upload Protobuf Output
uses: actions/upload-artifact@v4
with:
name: generated-proto
path: proto