diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 112567d11..b875e1ac9 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,10 +52,6 @@ jobs: files: | proto/**/*.proto - - name: Setup buf - if: steps.changed-proto-files.outputs.any_changed == 'true' - uses: bufbuild/buf-setup-action@v1.28.1 - - name: Build and generate proto if: steps.changed-proto-files.outputs.any_changed == 'true' run: | diff --git a/Makefile b/Makefile index acf77d8ec..ef2ee7533 100644 --- a/Makefile +++ b/Makefile @@ -13,7 +13,7 @@ DOCKER_IMAGE_GOLANG = golang:1.21-alpine3.17 DOCKER_IMAGE_GOLANG_CI = golangci/golangci-lint:v1.54 DOCKER_IMAGE_PROTO = ghcr.io/cosmos/proto-builder:0.14.0 DOCKER_IMAGE_BUF = bufbuild/buf:1.4.0 -DOCKER_PROTO_RUN := docker run --rm -v $(HOME)/.cache:/root/.cache -v $(PWD):/workspace --workdir /workspace $(DOCKER_IMAGE_PROTO) +DOCKER_PROTO_RUN := docker run --rm --user $(id -u):$(id -g) -v $(HOME)/.cache:/root/.cache -v $(PWD):/workspace --workdir /workspace $(DOCKER_IMAGE_PROTO) DOCKER_BUF_RUN := docker run --rm -v $(HOME)/.cache:/root/.cache -v $(PWD):/workspace --workdir /workspace $(DOCKER_IMAGE_BUF) DOCKER_BUILDX_BUILDER = okp4-builder DOCKER_IMAGE_MARKDOWNLINT = thegeeklab/markdownlint-cli:0.32.2 diff --git a/scripts/protocgen-code.sh b/scripts/protocgen-code.sh index 90c0014db..193100cf9 100755 --- a/scripts/protocgen-code.sh +++ b/scripts/protocgen-code.sh @@ -3,6 +3,7 @@ set -eo pipefail echo "Generating gogo proto code" + ( cd proto proto_dirs=$(find . -path -prune -o -name '*.proto' -print0 | xargs -0 -n1 dirname | sort | uniq) @@ -16,9 +17,5 @@ echo "Generating gogo proto code" done ) -DST="${PWD}/x" -( - cd github.com/okp4/okp4d/x - find . -type f -name "*.go" -exec mv {} "${DST}/{}" \; -) +cp -r github.com/okp4/okp4d/* ./ rm -rf github.com