Skip to content

Commit

Permalink
🧪 Pass Codecov token to reusable linters job
Browse files Browse the repository at this point in the history
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".
  • Loading branch information
webknjaz committed Feb 1, 2024
1 parent 41c133e commit 74840e8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/reusable-linters.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 74840e8

Please sign in to comment.