From ded9d8ea304777f50b1a34b40d2f3c18e59b1dc9 Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Wed, 22 Jan 2025 12:10:17 +0900 Subject: [PATCH 1/2] build(ci): remove the usage of GOPRIVATE --- .github/workflows/lint.yml | 7 ------- .github/workflows/test.yml | 19 ------------------- 2 files changed, 26 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 2b6222dd..eba5622f 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,10 +7,6 @@ on: branches: - main -env: - GOPRIVATE: github.com/milkyway-labs - GH_ACCESS_TOKEN: ${{ secrets.GOPRIVATE_ACCESS_TOKEN }} - # Cancel all previous runs of the same workflow when a new one is triggered in the same branch. concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -29,9 +25,6 @@ jobs: with: go-version: '1.23' - - name: Setup GOPRIVATE 🛡️ - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Compute diff 📜 uses: technote-space/get-diff-action@v6.1.2 id: git_diff diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index a52986ca..18b16123 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -5,10 +5,6 @@ on: branches: - main -env: - GOPRIVATE: github.com/milkyway-labs - GH_ACCESS_TOKEN: ${{ secrets.GOPRIVATE_ACCESS_TOKEN }} - # Cancel all previous runs of the same workflow when a new one is triggered in the same branch. concurrency: group: ${{ github.workflow }}-${{ github.ref }} @@ -26,9 +22,6 @@ jobs: - name: Display go version 🛂 run: go version - - name: Setup GOPRIVATE 🛡️ - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Install tparse 🔍 run: | export GO111MODULE="on" && go install github.com/mfridman/tparse@v0.8.3 @@ -53,9 +46,6 @@ jobs: with: go-version: '1.23' - - name: Setup GOPRIVATE 🛡️ - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Compute diff 📜 uses: technote-space/get-diff-action@v6.1.2 id: git_diff @@ -79,9 +69,6 @@ jobs: with: go-version: '1.23' - - name: Setup GOPRIVATE 🛡️ - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Create a file with all the pkgs 📜 run: go mod tidy && go list ./... > pkgs.txt @@ -128,9 +115,6 @@ jobs: with: go-version: '1.23' - - name: Setup GOPRIVATE 🛡️ - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Compute diff 📜 uses: technote-space/get-diff-action@v6.1.2 with: @@ -238,9 +222,6 @@ jobs: with: go-version: '1.23' - - name: Setup GOPRIVATE 🛡️ - run: git config --global url.https://$GH_ACCESS_TOKEN@github.com/.insteadOf https://github.com/ - - name: Compute diff 📜 uses: technote-space/get-diff-action@v6.1.2 with: From 5f9228913a019df43406cc881d5422a20e77171a Mon Sep 17 00:00:00 2001 From: Riccardo Montagnin Date: Wed, 22 Jan 2025 12:10:28 +0900 Subject: [PATCH 2/2] build(ci): add Codecov token usage --- .github/workflows/test.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 18b16123..e6492478 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -203,7 +203,8 @@ jobs: - name: Upload coverage to Codecov 📤 uses: codecov/codecov-action@v5 with: - file: ./coverage.txt + token: ${{ secrets.CODECOV_TOKEN }} + files: ./coverage.txt if: env.GIT_DIFF Test-race: