From 24db6c8efd61bc332eb103e3d4fec310136c5b2c Mon Sep 17 00:00:00 2001 From: SyniRon <66834451+SyniRon@users.noreply.github.com> Date: Fri, 17 Jan 2025 01:31:33 -0500 Subject: [PATCH] add docker image build and push on release --- .github/workflows/build_and_push.yml | 31 ++++++++++++++++++++++++ proto/milpacs.pb.go | 28 ++++++++++----------- proto/milpacs.proto | 2 +- third_party/OpenAPI/milpacs.swagger.json | 2 +- 4 files changed, 47 insertions(+), 16 deletions(-) create mode 100644 .github/workflows/build_and_push.yml diff --git a/.github/workflows/build_and_push.yml b/.github/workflows/build_and_push.yml new file mode 100644 index 0000000..10b7abc --- /dev/null +++ b/.github/workflows/build_and_push.yml @@ -0,0 +1,31 @@ +name: Build and Push Docker Image + +on: + release: + types: [created] + push: + tags: + - '[0-9]+.[0-9]+.[0-9]*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Log in to Docker Hub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Build and Push Docker Image + uses: docker/build-push-action@v4 + with: + context: . + push: true + tags: | + 7cav/api:${{ github.ref_name }} + 7cav/api:latest \ No newline at end of file diff --git a/proto/milpacs.pb.go b/proto/milpacs.pb.go index 6fdfb95..490dcda 100644 --- a/proto/milpacs.pb.go +++ b/proto/milpacs.pb.go @@ -1884,20 +1884,20 @@ var file_milpacs_proto_rawDesc = []byte{ 0x61, 0x69, 0x6c, 0x6f, 0x72, 0x65, 0x64, 0x20, 0x66, 0x6f, 0x72, 0x20, 0x53, 0x31, 0x20, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x73, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x12, 0x1c, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x76, 0x31, 0x2f, 0x73, 0x31, 0x2f, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, - 0x6d, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x42, 0xc6, 0x01, 0x92, 0x41, - 0xa7, 0x01, 0x12, 0x05, 0x32, 0x03, 0x31, 0x2e, 0x33, 0x2a, 0x01, 0x02, 0x5a, 0x59, 0x0a, 0x57, - 0x0a, 0x06, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x4d, 0x08, 0x02, 0x12, 0x38, 0x41, 0x75, - 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, 0x6f, 0x6b, - 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x62, 0x79, 0x20, - 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x3a, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x20, 0x3c, - 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3e, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, 0x69, 0x7a, - 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x62, 0x65, 0x61, - 0x72, 0x65, 0x72, 0x12, 0x00, 0x72, 0x32, 0x0a, 0x13, 0x37, 0x43, 0x61, 0x76, 0x20, 0x41, 0x50, - 0x49, 0x20, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1b, 0x68, 0x74, - 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x37, 0x63, 0x61, 0x76, 0x2f, 0x61, 0x70, 0x69, 0x5a, 0x19, 0x67, 0x69, 0x74, 0x68, 0x75, - 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x37, 0x63, 0x61, 0x76, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x6d, 0x73, 0x2f, 0x7b, 0x72, 0x6f, 0x73, 0x74, 0x65, 0x72, 0x7d, 0x42, 0xc8, 0x01, 0x92, 0x41, + 0xa9, 0x01, 0x12, 0x07, 0x32, 0x05, 0x31, 0x2e, 0x33, 0x2e, 0x31, 0x2a, 0x01, 0x02, 0x5a, 0x59, + 0x0a, 0x57, 0x0a, 0x06, 0x62, 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x4d, 0x08, 0x02, 0x12, 0x38, + 0x41, 0x75, 0x74, 0x68, 0x65, 0x6e, 0x74, 0x69, 0x63, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x74, + 0x6f, 0x6b, 0x65, 0x6e, 0x2c, 0x20, 0x70, 0x72, 0x65, 0x66, 0x69, 0x78, 0x65, 0x64, 0x20, 0x62, + 0x79, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, 0x3a, 0x20, 0x42, 0x65, 0x61, 0x72, 0x65, 0x72, + 0x20, 0x3c, 0x74, 0x6f, 0x6b, 0x65, 0x6e, 0x3e, 0x1a, 0x0d, 0x41, 0x75, 0x74, 0x68, 0x6f, 0x72, + 0x69, 0x7a, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x02, 0x62, 0x0c, 0x0a, 0x0a, 0x0a, 0x06, 0x62, + 0x65, 0x61, 0x72, 0x65, 0x72, 0x12, 0x00, 0x72, 0x32, 0x0a, 0x13, 0x37, 0x43, 0x61, 0x76, 0x20, + 0x41, 0x50, 0x49, 0x20, 0x52, 0x65, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x6f, 0x72, 0x79, 0x12, 0x1b, + 0x68, 0x74, 0x74, 0x70, 0x73, 0x3a, 0x2f, 0x2f, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, + 0x6f, 0x6d, 0x2f, 0x37, 0x63, 0x61, 0x76, 0x2f, 0x61, 0x70, 0x69, 0x5a, 0x19, 0x67, 0x69, 0x74, + 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x37, 0x63, 0x61, 0x76, 0x2f, 0x61, 0x70, 0x69, + 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( diff --git a/proto/milpacs.proto b/proto/milpacs.proto index a384c14..7a0f02c 100644 --- a/proto/milpacs.proto +++ b/proto/milpacs.proto @@ -28,7 +28,7 @@ import "protoc-gen-openapiv2/options/annotations.proto"; // These annotations are used when generating the OpenAPI file. option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = { info: { - version: "1.3"; + version: "1.3.1"; }; external_docs: { url: "https://github.com/7cav/api"; diff --git a/third_party/OpenAPI/milpacs.swagger.json b/third_party/OpenAPI/milpacs.swagger.json index 9f20e8f..94a06f0 100644 --- a/third_party/OpenAPI/milpacs.swagger.json +++ b/third_party/OpenAPI/milpacs.swagger.json @@ -2,7 +2,7 @@ "swagger": "2.0", "info": { "title": "milpacs.proto", - "version": "1.3" + "version": "1.3.1" }, "tags": [ {