This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 3c8cd1cec2 Properly pass codecov-token to composite action (#40138)
3c8cd1cec2 is described below
commit 3c8cd1cec26d9709e8f41f24c9a313f15c58d952
Author: Jarek Potiuk <[email protected]>
AuthorDate: Sat Jun 8 14:18:51 2024 +0200
Properly pass codecov-token to composite action (#40138)
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
---
.github/actions/post_tests_success/action.yml | 7 ++++++-
.github/workflows/integration-tests.yml | 2 ++
.github/workflows/run-unit-tests.yml | 2 ++
3 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/.github/actions/post_tests_success/action.yml
b/.github/actions/post_tests_success/action.yml
index f7803c0b71..e8cdfa4602 100644
--- a/.github/actions/post_tests_success/action.yml
+++ b/.github/actions/post_tests_success/action.yml
@@ -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:
@@ -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}}
diff --git a/.github/workflows/integration-tests.yml
b/.github/workflows/integration-tests.yml
index df9b06fbfc..e10447a01a 100644
--- a/.github/workflows/integration-tests.yml
+++ b/.github/workflows/integration-tests.yml
@@ -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()
diff --git a/.github/workflows/run-unit-tests.yml
b/.github/workflows/run-unit-tests.yml
index d100322412..ae108e7981 100644
--- a/.github/workflows/run-unit-tests.yml
+++ b/.github/workflows/run-unit-tests.yml
@@ -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