From e0b68c6749509c5f83f984dd99a76a1c1a231044 Mon Sep 17 00:00:00 2001 From: Tom Hu <88201630+thomasrockhu-codecov@users.noreply.github.com> Date: Thu, 1 Feb 2024 14:13:53 -0800 Subject: [PATCH] fix: show both token uses in readme (#1250) --- README.md | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ac95bb6d4..0a0f8b857 100644 --- a/README.md +++ b/README.md @@ -35,10 +35,25 @@ steps: - uses: actions/checkout@master - uses: codecov/codecov-action@v4 with: + fail_ci_if_error: true # optional (default = false) files: ./coverage1.xml,./coverage2.xml # optional flags: unittests # optional name: codecov-umbrella # optional + token: ${{ secrets.CODECOV_TOKEN }} # required + verbose: true # optional (default = false) +``` + +The Codecov token can also be passed in via environment variables: + +```yaml +steps: +- uses: actions/checkout@master +- uses: codecov/codecov-action@v4 + with: fail_ci_if_error: true # optional (default = false) + files: ./coverage1.xml,./coverage2.xml # optional + flags: unittests # optional + name: codecov-umbrella # optional verbose: true # optional (default = false) env: CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} @@ -125,9 +140,8 @@ jobs: files: ./coverage1.xml,./coverage2.xml,!./cache flags: unittests name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} verbose: true - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} ``` ## Contributing