From cd71082c849e773e5e214c06cbf40aa703e6177f Mon Sep 17 00:00:00 2001 From: VRamakrishna Date: Fri, 16 Aug 2024 09:40:55 +0000 Subject: [PATCH] fix(ci): updated permissioning and versioning in GitHub Actions This fixes the failing 'deploy_docs.yaml' action by adding token with appropriate permissioning. It pegs the protoc-gen-go-grpc version in the relevant actions to v1.4.0 to match what's written in the documentation (this avoids test network setup failures when running integration tests.) Also removed dead code from the Weaver Corda sample application. Made 'mkdocs' publish URL customizable by owner. Signed-off-by: VRamakrishna --- .github/workflows/deploy_docs.yml | 4 ++++ .github/workflows/test_weaver-asset-exchange-fabric.yaml | 2 +- .github/workflows/test_weaver-asset-transfer.yaml | 2 +- .github/workflows/test_weaver-data-sharing.yaml | 4 ++-- .github/workflows/test_weaver-fabric-fabric-satp.yaml | 2 +- docs/mkdocs.yml | 2 +- .../corda/corda-simple-application/clients/build.gradle | 1 - weaver/samples/corda/corda-simple-application/makefile | 3 --- 8 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/deploy_docs.yml b/.github/workflows/deploy_docs.yml index 475622740f..4543392b92 100644 --- a/.github/workflows/deploy_docs.yml +++ b/.github/workflows/deploy_docs.yml @@ -18,11 +18,15 @@ on: env: SITE_URL: https://${{ github.repository_owner }}.github.io/cacti NODEJS_VERSION: v18.18.2 + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: deploy-docs: runs-on: ubuntu-22.04 + permissions: + contents: write + pages: write steps: - name: Use Node.js ${{ env.NODEJS_VERSION }} uses: actions/setup-node@v4.0.3 diff --git a/.github/workflows/test_weaver-asset-exchange-fabric.yaml b/.github/workflows/test_weaver-asset-exchange-fabric.yaml index 3857198b2d..bdaa32506e 100644 --- a/.github/workflows/test_weaver-asset-exchange-fabric.yaml +++ b/.github/workflows/test_weaver-asset-exchange-fabric.yaml @@ -144,7 +144,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc 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 google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build JS Protos diff --git a/.github/workflows/test_weaver-asset-transfer.yaml b/.github/workflows/test_weaver-asset-transfer.yaml index 932982478c..1c120be82d 100644 --- a/.github/workflows/test_weaver-asset-transfer.yaml +++ b/.github/workflows/test_weaver-asset-transfer.yaml @@ -728,7 +728,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc 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 google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build GO Protos diff --git a/.github/workflows/test_weaver-data-sharing.yaml b/.github/workflows/test_weaver-data-sharing.yaml index 28c40df9fe..82e2de6d03 100644 --- a/.github/workflows/test_weaver-data-sharing.yaml +++ b/.github/workflows/test_weaver-data-sharing.yaml @@ -456,7 +456,7 @@ jobs: unzip protoc-3.15.6-linux-x86_64.zip -d protoc rm -rf protoc-3.15.6-linux-x86_64.zip 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 google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 - name: CI script for cleanup run: ./tools/ci.sh @@ -896,7 +896,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc 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 google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS - name: Build GO Protos diff --git a/.github/workflows/test_weaver-fabric-fabric-satp.yaml b/.github/workflows/test_weaver-fabric-fabric-satp.yaml index 87345bd2db..12f7f72ddb 100644 --- a/.github/workflows/test_weaver-fabric-fabric-satp.yaml +++ b/.github/workflows/test_weaver-fabric-fabric-satp.yaml @@ -73,7 +73,7 @@ jobs: curl -LO https://github.com/protocolbuffers/protobuf/releases/download/v3.15.6/protoc-3.15.6-linux-x86_64.zip unzip protoc-3.15.6-linux-x86_64.zip -d protoc 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 google.golang.org/grpc/cmd/protoc-gen-go-grpc@v1.4.0 # PROTOS GO - name: Build GO Protos diff --git a/docs/mkdocs.yml b/docs/mkdocs.yml index f9514d6e9b..b365ccd1b2 100644 --- a/docs/mkdocs.yml +++ b/docs/mkdocs.yml @@ -1,5 +1,5 @@ site_name: Using and Developing with Hyperledger Cacti -site_url: !ENV [SITE_URL, 'https://hyperledger.github.io/cacti'] +site_url: !ENV [SITE_URL, 'https://${{ github.repository_owner }}.github.io/cacti'] repo_name: hyperledger/cacti repo_url: https://github.com/hyperledger/cacti theme: diff --git a/weaver/samples/corda/corda-simple-application/clients/build.gradle b/weaver/samples/corda/corda-simple-application/clients/build.gradle index d24e4a7638..7ab1cbcfbb 100644 --- a/weaver/samples/corda/corda-simple-application/clients/build.gradle +++ b/weaver/samples/corda/corda-simple-application/clients/build.gradle @@ -49,7 +49,6 @@ repositories { dirs '../../../../core/network/corda-interop-app/interop-workflows/build/libs' dirs '../../../../sdks/corda/build/libs' dirs '../../../../common/protos-java-kt/build/libs' - dirs 'libs' } } } diff --git a/weaver/samples/corda/corda-simple-application/makefile b/weaver/samples/corda/corda-simple-application/makefile index f153520476..ffb20efd4e 100644 --- a/weaver/samples/corda/corda-simple-application/makefile +++ b/weaver/samples/corda/corda-simple-application/makefile @@ -1,5 +1,3 @@ -CLIKT_VERSION=$(shell grep cliktVersion ./constants.properties | cut -d '=' -f 2) - .PHONY: build-local-weaver-dependencies build-local-weaver-dependencies: echo "Building local protos..." @@ -112,4 +110,3 @@ publish-cordapps: clean: ./gradlew clean rm -rf .gradle - rm -rf clients/libs