Skip to content

Commit

Permalink
Properly pass codecov-token to composite action (#40138)
Browse files Browse the repository at this point in the history
Turns out that in order to pass secret to a composite action you
need to pass it as input.

Further follow up on #40136 and #40128
  • Loading branch information
potiuk authored Jun 8, 2024
1 parent 663d422 commit 3c8cd1c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/actions/post_tests_success/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
---
name: 'Post tests on success'
description: 'Run post tests actions on success'
inputs:
codecov-token:
description: 'Codecov token'
required: true
default: ''
runs:
using: "composite"
steps:
Expand All @@ -37,7 +42,7 @@ runs:
- name: "Upload all coverage reports to codecov"
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
CODECOV_TOKEN: ${{ inputs.codecov-token }}
if: env.ENABLE_COVERAGE == 'true' && env.TEST_TYPES != 'Helm'
with:
name: coverage-${{env.JOB_ID}}
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ jobs:
run: ./scripts/ci/testing/run_integration_tests_with_retry.sh ${{ matrix.integration }}
- name: "Post Tests success: Integration Tests ${{ matrix.integration }}"
uses: ./.github/actions/post_tests_success
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
- name: "Post Tests failure: Integration Tests ${{ matrix.integration }}"
uses: ./.github/actions/post_tests_failure
if: failure()
2 changes: 2 additions & 0 deletions .github/workflows/run-unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ jobs:
fi
- name: "Post Tests success"
uses: ./.github/actions/post_tests_success
with:
codecov-token: ${{ secrets.CODECOV_TOKEN }}
if: success()
- name: "Post Tests failure"
uses: ./.github/actions/post_tests_failure
Expand Down

0 comments on commit 3c8cd1c

Please sign in to comment.