From 29800520f22fefbb6f99e427599df6a968a9c189 Mon Sep 17 00:00:00 2001 From: Yongwoo Lee Date: Tue, 13 Jul 2021 14:19:16 +0900 Subject: [PATCH] chore: remove private module dependencies --- .github/workflows/lint.yml | 4 ---- .github/workflows/sims.yml | 12 ------------ .github/workflows/test.yml | 24 ------------------------ Dockerfile | 3 --- Makefile | 2 +- scripts/protocgen.sh | 2 -- 6 files changed, 1 insertion(+), 46 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d11ccc8fd2..7c9fca5151 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -15,10 +15,6 @@ jobs: runs-on: ubuntu-latest timeout-minutes: 6 steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: technote-space/get-diff-action@v4 with: diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index e61eb225f6..31ba057636 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -24,10 +24,6 @@ jobs: runs-on: ubuntu-latest if: "!contains(github.event.head_commit.message, 'skip-sims')" steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -56,10 +52,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -86,10 +78,6 @@ jobs: runs-on: ubuntu-latest needs: [build, install-runsim] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 492b0e333f..f63e1d6ef2 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -40,10 +40,6 @@ jobs: matrix: go-arch: ["amd64", "arm", "arm64"] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -62,10 +58,6 @@ jobs: # test-cosmovisor: # runs-on: ubuntu-latest # steps: - # - name: Configure git for private modules - # env: - # TOKEN: ${{ secrets.TOKEN }} - # run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" # - uses: actions/checkout@v2 # - uses: actions/setup-go@v2.1.3 # with: @@ -88,10 +80,6 @@ jobs: split-test-files: runs-on: ubuntu-latest steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - name: Create a file with all the pkgs run: go list ./... > pkgs.txt @@ -123,10 +111,6 @@ jobs: matrix: part: ["00", "01", "02", "03"] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -204,10 +188,6 @@ jobs: matrix: part: ["00", "01", "02", "03"] steps: - - name: Configure git for private modules - env: - TOKEN: ${{ secrets.TOKEN }} - run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" - uses: actions/checkout@v2 - uses: actions/setup-go@v2.1.3 with: @@ -274,10 +254,6 @@ jobs: # runs-on: ubuntu-latest # timeout-minutes: 10 # steps: -# - name: Configure git for private modules -# env: -# TOKEN: ${{ secrets.TOKEN }} -# run: git config --global url."https://${TOKEN}:x-oauth-basic@github.com".insteadOf "https://github.com" # - uses: actions/checkout@v2 # - uses: actions/setup-go@v2.1.3 # with: diff --git a/Dockerfile b/Dockerfile index 33ddcc731e..0b9457021d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -23,9 +23,6 @@ WORKDIR /go/src/github.com/line/lfb-sdk COPY . . # install simapp, remove packages -# TODO ebony: fix module download error in docker -RUN go env -w GOPRIVATE=github.com/line/* -RUN git config --global url."https://$GITHUB_TOKEN:x-oauth-basic@github.com/".insteadOf "https://github.com/" RUN make build-linux diff --git a/Makefile b/Makefile index 88a449e7e2..491d25fcfc 100644 --- a/Makefile +++ b/Makefile @@ -394,7 +394,7 @@ proto-all: proto-format proto-lint proto-gen proto-gen: @echo "Generating Protobuf files" - $(DOCKER) run --rm -e GITHUB_TOKEN=$(GITHUB_TOKEN) -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh + $(DOCKER) run --rm -e -v $(CURDIR):/workspace --workdir /workspace tendermintdev/sdk-proto-gen sh ./scripts/protocgen.sh proto-format: @echo "Formatting Protobuf files" diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index 1a1c4924d9..fee10b17cb 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -4,8 +4,6 @@ set -eo pipefail # TODO ebony apk add --no-cache git -go env -w GOPRIVATE=github.com/line/* -git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" protoc_gen_gocosmos() { if ! grep "github.com/gogo/protobuf => github.com/regen-network/protobuf" go.mod &>/dev/null ; then