From eefc9ad206a1f91901b50046f861ea3baef4e8d5 Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Mon, 6 May 2024 17:49:12 +0200 Subject: [PATCH] Pass secrets to templates Signed-off-by: Antonio Navarro Perez --- .github/gnokeykc.yml | 4 +++- .github/workflows/gnodev.yml | 4 +++- .github/workflows/gnofaucet.yml | 4 +++- .github/workflows/gnoland.yml | 4 +++- .github/workflows/gnomod.yml | 4 +++- .github/workflows/gnovm.yml | 4 +++- .github/workflows/main_template.yml | 6 +++++- .github/workflows/test_template.yml | 7 +++++-- .github/workflows/tm2.yml | 4 +++- 9 files changed, 31 insertions(+), 10 deletions(-) diff --git a/.github/gnokeykc.yml b/.github/gnokeykc.yml index bdaa4555bba..f06973f2909 100644 --- a/.github/gnokeykc.yml +++ b/.github/gnokeykc.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "contribs/gnokeykc" \ No newline at end of file + modulepath: "contribs/gnokeykc" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/gnodev.yml b/.github/workflows/gnodev.yml index d648554c8b3..4714d26c048 100644 --- a/.github/workflows/gnodev.yml +++ b/.github/workflows/gnodev.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "contribs/gnodev" \ No newline at end of file + modulepath: "contribs/gnodev" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/gnofaucet.yml b/.github/workflows/gnofaucet.yml index 72254e58faa..c99da469af2 100644 --- a/.github/workflows/gnofaucet.yml +++ b/.github/workflows/gnofaucet.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "contribs/gnofaucet" \ No newline at end of file + modulepath: "contribs/gnofaucet" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/gnoland.yml b/.github/workflows/gnoland.yml index 9c99aabbafd..97df3f13a2a 100644 --- a/.github/workflows/gnoland.yml +++ b/.github/workflows/gnoland.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "gno.land" \ No newline at end of file + modulepath: "gno.land" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/gnomod.yml b/.github/workflows/gnomod.yml index fcca44899a3..cfc1cb715a9 100644 --- a/.github/workflows/gnomod.yml +++ b/.github/workflows/gnomod.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "contribs/gnomd" \ No newline at end of file + modulepath: "contribs/gnomd" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/gnovm.yml b/.github/workflows/gnovm.yml index aff3ce5b48d..ac304328dbb 100644 --- a/.github/workflows/gnovm.yml +++ b/.github/workflows/gnovm.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "gnovm" \ No newline at end of file + modulepath: "gnovm" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/main_template.yml b/.github/workflows/main_template.yml index 6fd2874823d..be957fa5e26 100644 --- a/.github/workflows/main_template.yml +++ b/.github/workflows/main_template.yml @@ -4,7 +4,9 @@ on: modulepath: required: true type: string - + secrets: + codecov-token: + required: true env: GOVERSION: 1.22.x @@ -25,4 +27,6 @@ jobs: with: modulepath: ${{ inputs.modulepath }} tests-timeout: "30m" + secrets: + codecov-token: ${{ secrets.codecov-token }} \ No newline at end of file diff --git a/.github/workflows/test_template.yml b/.github/workflows/test_template.yml index 2b42984bc11..9cb3fdd614c 100644 --- a/.github/workflows/test_template.yml +++ b/.github/workflows/test_template.yml @@ -7,6 +7,9 @@ on: tests-timeout: required: true type: string + secrets: + codecov-token: + required: true jobs: test: @@ -24,9 +27,9 @@ jobs: run: go test -coverprofile coverage.out -covermode=atomic -timeout ${{ inputs.tests-timeout }} -v ./... working-directory: ${{ inputs.modulepath }} - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v4 with: - # token: ${{ secrets.CODECOV_TOKEN }} # TODO: moved to codecov v3 because v4 was causing a ton of problems + token: ${{ secrets.codecov-token }} verbose: true fail_ci_if_error: true flags: ${{ inputs.modulepath }} diff --git a/.github/workflows/tm2.yml b/.github/workflows/tm2.yml index 5da13bc52ae..30811de9039 100644 --- a/.github/workflows/tm2.yml +++ b/.github/workflows/tm2.yml @@ -15,4 +15,6 @@ jobs: name: Run Main uses: ./.github/workflows/main_template.yml with: - modulepath: "tm2" \ No newline at end of file + modulepath: "tm2" + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} \ No newline at end of file