From f3e2a9dea152bf15e5e3265fa0c167c88a17e031 Mon Sep 17 00:00:00 2001 From: Nikolai Rodionov Date: Tue, 21 Apr 2026 08:11:30 +0200 Subject: [PATCH] Add js generation Signed-off-by: Nikolai Rodionov --- .woodpecker/js-generate.yaml | 42 ++++++++++++++++++++++++++++++++++++ README.md | 23 ++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .woodpecker/js-generate.yaml diff --git a/.woodpecker/js-generate.yaml b/.woodpecker/js-generate.yaml new file mode 100644 index 0000000..75dd8ef --- /dev/null +++ b/.woodpecker/js-generate.yaml @@ -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 diff --git a/README.md b/README.md index 776e9fb..6f84d64 100644 --- a/README.md +++ b/README.md @@ -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 @@ + + + +### PongRequest + + + + + + + + + +### 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) | |