Skip to content

Commit

Permalink
feat: add release_please.yml & fix lint
Browse files Browse the repository at this point in the history
Signed-off-by: Matthis Holleville <matthish29@gmail.com>
  • Loading branch information
matthisholleville committed May 24, 2023
1 parent 19e6116 commit bac4e35
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 23 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/release_please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Release Please

on:
push:
branches:
- main

permissions:
contents: read

jobs:
release-please:
permissions:
contents: write # for google-github-actions/release-please-action to create release commit
pull-requests: write # for google-github-actions/release-please-action to create release PR
runs-on: ubuntu-latest

# Release-please creates a PR that tracks all changes
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
command: manifest
token: ${{secrets.GITHUB_TOKEN}}
default-branch: main
outputs:
releases_created: ${{ steps.release.outputs.releases_created }}
# these are generated by release-please b/c this is in a manifest repo.
buf_release_tag: ${{ steps.release.outputs.protobuf--tag_name }}

push-module:
needs: release-please
name: push schema to buf registry
runs-on: ubuntu-latest
if: ${{ needs.release-please.outputs.releases_created && needs.release-please.outputs.buf_release_tag }}
steps:
# Run `git checkout`
- uses: actions/checkout@v3
with:
ref: ${{ needs.release-please.outputs.buf_release_tag }}
# Install the `buf` CLI
- uses: bufbuild/buf-setup-action@v1
# Push module to the BSR
- name: bsr-push
run: BUF_TOKEN="${{ secrets.BUF_TOKEN }}" buf push --tag "${{ needs.release-please.outputs.buf_release_tag }}" protobuf
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Generate go-grpc and go stubs

```
make gen-go
```
```
51 changes: 29 additions & 22 deletions protobuf/schema/v1/schema.proto
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ package schema.v1;
option go_package = "schema/service/v1";

message AnalyzeRequest {
string backend = 1;
string namespace = 2;
bool explain = 3;
bool anonymize = 4;
bool nocache = 5;
string language = 6;
int32 max_concurrency = 7;
string output = 8;
repeated string filters = 9;
string backend = 1;
string namespace = 2;
bool explain = 3;
bool anonymize = 4;
bool nocache = 5;
string language = 6;
int32 max_concurrency = 7;
string output = 8;
repeated string filters = 9;
}

message SensitiveData {
string unmasked = 1;
string masked = 2;
string unmasked = 1;
string masked = 2;
}

message ErrorDetail {
Expand Down Expand Up @@ -56,22 +56,29 @@ message AnalysisItem {
string description = 2;
}

message ConfigRequest {
message AddConfigRequest {
Cache cache = 1;
}

message Cache {
string region = 1;
string bucketName = 2;
message AddConfigResponse {
string status = 1;
}

message RemoveConfigRequest {
Cache cache = 1;
}

message ConfigResponse {
message RemoveConfigResponse {
string status = 1;
}

// Service defines the exposed rpcs of k8sgpt
service Server {
rpc Analyze (AnalyzeRequest) returns (AnalyzeResponse) {}
rpc AddConfig (ConfigRequest) returns (ConfigResponse) {}
rpc RemoveConfig (ConfigRequest) returns (ConfigResponse) {}
}
message Cache {
string region = 1;
string bucket_name = 2;
}

service ServerService {
rpc Analyze(AnalyzeRequest) returns (AnalyzeResponse) {}
rpc AddConfig(AddConfigRequest) returns (AddConfigResponse) {}
rpc RemoveConfig(RemoveConfigRequest) returns (RemoveConfigResponse) {}
}

0 comments on commit bac4e35

Please sign in to comment.