Add js generation

Signed-off-by: Nikolai Rodionov <iam@allanger.xyz>
This commit is contained in:
2026-04-21 08:11:30 +02:00
parent 22e8ba2da5
commit f3e2a9dea1
2 changed files with 65 additions and 0 deletions

View File

@@ -0,0 +1,42 @@
---
when:
event:
- push
steps:
- name: Clone go repo
image: alpine
environment:
GITEA_USER: devops-bot
GITEA_TOKEN:
from_secret: gitea_repo_access
commands:
- apk update && apk add git
- git clone https://$GITEA_USER:$GITEA_TOKEN@gitea.badhouseplants.net/softplayer/softplayer-js-proto.git target
- git -C ./target config user.name "devops-bot"
- git -C ./target config user.email "bot@badhouseplants.net"
- name: Generate go code
image: bufbuild/buf
commands:
- buf generate
- rm -rf ./target/pkg/*
- cp -r ./gen/ts/* ./target/proto
- name: Clone go repo
image: alpine
environment:
GITEA_USER: devops-bot
GITEA_TOKEN:
from_secret: gitea_repo_access
commands:
- apk update && apk add git
- git config user.name "woodpecker-ci"
- git config user.email "bot@badhouseplants.net"
- git -C ./target checkout $CI_COMMIT_BRANCH || git -C ./target checkout -b $CI_COMMIT_BRANCH
- git -C ./target add .
- |-
git -C ./target commit --allow-empty \
-m "Update protobuf definitions: ${CI_COMMIT_SHA:0:8}" \
-m "By ${CI_COMMIT_AUTHOR}" \
-m "Commit link: ${CI_REPO_URL}/commit/${CI_COMMIT_SHA}" \
-m "Pipeline link: ${CI_PIPELINE_URL}"
- git -C ./target push --set-upstream origin $CI_COMMIT_BRANCH

View File

@@ -6,6 +6,8 @@
- [test/v1/test_v1.proto](#test_v1_test_v1-proto)
- [PingRequest](#test-v1-PingRequest)
- [PingResponse](#test-v1-PingResponse)
- [PongRequest](#test-v1-PongRequest)
- [PongResponse](#test-v1-PongResponse)
- [TestService](#test-v1-TestService)
@@ -39,6 +41,26 @@
<a name="test-v1-PongRequest"></a>
### PongRequest
<a name="test-v1-PongResponse"></a>
### PongResponse
@@ -54,6 +76,7 @@ Service for handling environments
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| Ping | [PingRequest](#test-v1-PingRequest) | [PingResponse](#test-v1-PingResponse) | |
| Pong | [PongRequest](#test-v1-PongRequest) | [PongResponse](#test-v1-PongResponse) | |