From 9003a1eb9133f045713657cd32d49924f3c06387 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Tue, 25 Jun 2024 16:59:11 +0800 Subject: [PATCH 1/2] Revert "Fix: codecov: use environ to pass CODECOV_TOKEN (#1472)" This reverts commit 7dd695c60e29e72bdcb01e3989679fefdacfc3ea. --- .github/workflows/crmsh-ci.yml | 78 ++++++++++++---------------------- 1 file changed, 26 insertions(+), 52 deletions(-) diff --git a/.github/workflows/crmsh-ci.yml b/.github/workflows/crmsh-ci.yml index 4af95c6f0..4d4df3ea1 100644 --- a/.github/workflows/crmsh-ci.yml +++ b/.github/workflows/crmsh-ci.yml @@ -50,9 +50,8 @@ jobs: tox -v -e${{ matrix.python-version }} - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: unit - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_crm_report_bugs: runs-on: ubuntu-24.04 @@ -67,9 +66,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_crm_report_normal: runs-on: ubuntu-24.04 @@ -84,9 +82,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_bootstrap_bugs: runs-on: ubuntu-24.04 @@ -101,9 +98,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_bootstrap_bugs_non_root: runs-on: ubuntu-24.04 @@ -118,9 +114,8 @@ jobs: $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_bootstrap_common: runs-on: ubuntu-24.04 @@ -135,9 +130,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_bootstrap_common_non_root: runs-on: ubuntu-24.04 @@ -152,9 +146,8 @@ jobs: $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_bootstrap_options: runs-on: ubuntu-24.04 @@ -169,9 +162,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_corosync_ui: runs-on: ubuntu-24.04 @@ -186,9 +178,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_bootstrap_options_non_root: runs-on: ubuntu-24.04 @@ -203,9 +194,8 @@ jobs: $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_qdevice_setup_remove: runs-on: ubuntu-24.04 @@ -220,9 +210,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_qdevice_setup_remove_non_root: runs-on: ubuntu-24.04 @@ -237,9 +226,8 @@ jobs: $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_qdevice_options: runs-on: ubuntu-24.04 @@ -254,9 +242,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_qdevice_validate: runs-on: ubuntu-24.04 @@ -271,9 +258,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_qdevice_validate_non_root: runs-on: ubuntu-24.04 @@ -288,9 +274,8 @@ jobs: $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_qdevice_user_case: runs-on: ubuntu-24.04 @@ -305,9 +290,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_resource_failcount: runs-on: ubuntu-24.04 @@ -322,9 +306,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_resource_set: runs-on: ubuntu-24.04 @@ -339,9 +322,8 @@ jobs: $DOCKER_SCRIPT $index - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_resource_set_non_root: runs-on: ubuntu-24.04 @@ -356,9 +338,8 @@ jobs: $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_configure_sublevel: runs-on: ubuntu-24.04 @@ -373,9 +354,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_constraints_bugs: runs-on: ubuntu-24.04 @@ -390,9 +370,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_geo_cluster: runs-on: ubuntu-24.04 @@ -407,9 +386,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_healthcheck: runs-on: ubuntu-24.04 @@ -424,9 +402,8 @@ jobs: $DOCKER_SCRIPT $index && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT $index -u - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_cluster_api: runs-on: ubuntu-24.04 @@ -440,9 +417,8 @@ jobs: $DOCKER_SCRIPT `$GET_INDEX_OF cluster_api` - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_user_access: runs-on: ubuntu-24.04 @@ -456,9 +432,8 @@ jobs: $DOCKER_SCRIPT `$GET_INDEX_OF user_access` - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} functional_test_ssh_agent: runs-on: ubuntu-24.04 @@ -472,9 +447,8 @@ jobs: $DOCKER_SCRIPT `$GET_INDEX_OF ssh_agent` && $DOCKER_SCRIPT -d && $DOCKER_SCRIPT -u `$GET_INDEX_OF ssh_agent` - uses: codecov/codecov-action@v4 with: + token: ${{ secrets.CODECOV_TOKEN }} flags: integration - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} original_regression_test: runs-on: ubuntu-24.04 From fa0ef966e15fa082810afea5f2e7f9fe8f03a810 Mon Sep 17 00:00:00 2001 From: nicholasyang Date: Tue, 25 Jun 2024 17:01:22 +0800 Subject: [PATCH 2/2] Fix: github-actions: should pass secrets to reusable workflows fixes #1472 --- .github/workflows/crmsh-cd.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/crmsh-cd.yml b/.github/workflows/crmsh-cd.yml index 8a582f87c..031622d59 100644 --- a/.github/workflows/crmsh-cd.yml +++ b/.github/workflows/crmsh-cd.yml @@ -18,6 +18,7 @@ jobs: integration: if: github.repository == 'ClusterLabs/crmsh' && github.ref_name == 'master' uses: ./.github/workflows/crmsh-ci.yml + secrets: inherit delivery: needs: integration