Skip to content

Commit ad550f1

Browse files
authored
Merge pull request #6 from razorpay/edge
Update packages
2 parents 99033c9 + 36cc497 commit ad550f1

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

Dockerfile

+7-5
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ FROM public.ecr.aws/bitnami/golang
22

33
RUN apt update; apt install -y make git curl bash jq awscli
44

5-
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.5.0
6-
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26.0
5+
RUN go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@v2.10.0
6+
RUN go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.28.0
77

88
RUN curl -sSL \
9-
"https://github.com/bufbuild/buf/releases/download/v1.1.0/buf-Linux-x86_64" \
9+
"https://github.com/bufbuild/buf/releases/download/v1.3.1/buf-Linux-x86_64" \
1010
-o "$(go env GOPATH)/bin/buf" && \
1111
chmod +x "$(go env GOPATH)/bin/buf"
1212

13-
COPY . /
13+
COPY . /action
1414

15-
ENTRYPOINT [ "/entrypoint.sh" ]
15+
WORKDIR /action
16+
17+
ENTRYPOINT [ "/action/entrypoint.sh" ]

buf.gen.yaml

+2-3
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ plugins:
66
- generate_unbound_methods=true
77
- disable_default_errors=true
88
- allow_merge=false
9-
- include_package_in_tags=false
109
- json_names_for_fields=false
11-
- include_package_in_tags=true
12-
- fqn_for_openapi_name=true
10+
- openapi_naming_strategy=fqn
11+
- allow_delete_body=true

entrypoint.sh

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
#!/bin/bash
22
set -euo pipefail
33

4+
cd /action
5+
46
echo "cloning protobuf files"
5-
bash /sparse-checkout.sh
7+
bash sparse-checkout.sh
68

79
echo "generating swagger docs"
8-
cd / && buf beta mod update && buf generate
10+
buf mod update && buf generate
911

1012
echo "combining swagger docs into 1 file"
11-
bash /combine_swagger_docs.sh /docs
13+
bash combine_swagger_docs.sh docs
1214

1315
echo "create repo/branch dir structure"
1416
mkdir -p /_docs/${GITHUB_REPOSITORY#*/} && mv combined.json /_docs/${GITHUB_REPOSITORY#*/}/${GITHUB_REF##*/}.json
1517

1618

1719
echo "upload to s3"
18-
bash /upload_to_s3.sh
20+
bash upload_to_s3.sh

sparse-checkout.sh

+3-4
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ IFS=$'\n\t'
55
# remove ref/head from $INPUT_PROTO_BRANCH
66
BRANCH_NAME=$(echo ${INPUT_PROTO_BRANCH#refs/heads/})
77

8-
mkdir -p /proto
9-
cd /proto
8+
mkdir proto
9+
cd proto
1010
git init
1111
git config --local gc.auto 0
1212
git config core.sparseCheckout true
@@ -15,5 +15,4 @@ cp $GITHUB_WORKSPACE/${INPUT_MODULE_LIST_FILE_PATH} .git/info/sparse-checkout
1515
git remote add origin https://${INPUT_GIT_TOKEN}@github.com/${INPUT_PROTO_REPOSITORY}
1616
git -c protocol.version=2 fetch --no-tags --prune --depth=1 origin ${BRANCH_NAME}
1717
git checkout --force -B ${BRANCH_NAME} origin/${BRANCH_NAME}
18-
19-
cd /
18+
cd ..

0 commit comments

Comments
 (0)