From 74840e8fdf84e4617054f3fe6581a5ec5e507554 Mon Sep 17 00:00:00 2001 From: Sviatoslav Sydorenko Date: Thu, 1 Feb 2024 20:26:47 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20Pass=20Codecov=20token=20to=20re?= =?UTF-8?q?usable=20linters=20job?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit v4 demands that it's present and if not passed explicitly, GitHub Actions shields access to the repo secrets in reusable workflow. This results in an empty string being passed to the action and subsequently erroring out with a "no token found". --- .github/workflows/ci-cd.yml | 2 ++ .github/workflows/reusable-linters.yml | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci-cd.yml b/.github/workflows/ci-cd.yml index ac8fa6421..922223f30 100644 --- a/.github/workflows/ci-cd.yml +++ b/.github/workflows/ci-cd.yml @@ -110,6 +110,8 @@ jobs: lint: uses: ./.github/workflows/reusable-linters.yml + secrets: + codecov-token: ${{ secrets.CODECOV_TOKEN }} build-wheels-for-tested-arches: name: Build wheels on ${{ matrix.os }} diff --git a/.github/workflows/reusable-linters.yml b/.github/workflows/reusable-linters.yml index 229df79de..0c4095220 100644 --- a/.github/workflows/reusable-linters.yml +++ b/.github/workflows/reusable-linters.yml @@ -4,6 +4,10 @@ name: Linters on: workflow_call: + secrets: + codecov-token: + description: Mandatory token for uploading to Codecov + required: true env: COLOR: >- # Supposedly, pytest or coveragepy use this @@ -59,7 +63,7 @@ jobs: - name: Send coverage data to Codecov uses: codecov/codecov-action@v4 with: - token: ${{ secrets.CODECOV_TOKEN }} + token: ${{ secrets.codecov-token }} files: >- .tox/.tmp/.mypy/python-3.13/cobertura.xml, .tox/.tmp/.mypy/python-3.11/cobertura.xml,