update pipeline

This commit is contained in:
2025-05-26 00:21:54 +02:00
parent 27fd75f87d
commit 2639311afa
2 changed files with 82 additions and 0 deletions

View File

@@ -22,6 +22,43 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Install protoc
run: |
curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
unzip protoc-21.12-linux-x86_64.zip -d protoc3
sudo mv protoc3/bin/* /usr/local/bin/
sudo mv protoc3/include/* /usr/local/include/
rm -rf protoc-21.12-linux-x86_64.zip protoc3
- name: Install protoc-gen plugins
run: |
go install google.golang.org/protobuf/cmd/protoc-gen-go@latest
go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
export PATH=$PATH:$(go env GOPATH)/bin
- name: Generate protobuf code
run: |
protoc \
-I grpc-backend/proto \
-I grpc-backend/googleapis \
--go_out=grpc-backend/gen --go_opt=paths=source_relative \
--go-grpc_out=grpc-backend/gen --go-grpc_opt=paths=source_relative \
--grpc-gateway_out=grpc-backend/gen --grpc-gateway_opt=paths=source_relative \
--openapiv2_out=grpc-backend/gen/swagger \
grpc-backend/proto/osu_music.proto
- name: Build osu-server binary
run: |
go build -o osu-server ./grpc-backend/cmd/main.go
- name: Upload osu-server binary artifact
uses: actions/upload-artifact@v3
with:
name: osu-server-binary
path: osu-server
- name: Build Proxy Docker image
run: |
docker build -t juli0n21/proxy-container:latest -t juli0n21/proxy-container:${{ github.sha }} ./proxy