From dc14a212ebbc28c376fc87917b71b44cebbc2fee Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 19 Nov 2024 22:22:48 -0500 Subject: [PATCH] ci: twister: check event using correct context Check for event using correct github context. Signed-off-by: Anas Nashif --- .github/workflows/twister-publish.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/twister-publish.yaml b/.github/workflows/twister-publish.yaml index 9dc80ec17bf..7e32b076272 100644 --- a/.github/workflows/twister-publish.yaml +++ b/.github/workflows/twister-publish.yaml @@ -41,12 +41,12 @@ jobs: pip3 install elasticsearch # set run date on upload to get consistent and unified data across the matrix. run_date=`date --iso-8601=minutes` - if [ "${{github.event_name}}" = "push" ]; then - python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \ - --run-attempt ${{github.run_attempt}} \ - --index zephyr-main-ci-push-1 artifacts/*/*/twister.json - elif [ "${{github.event_name}}" = "schedule" ]; then - python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \ - --run-attempt ${{github.run_attempt}} \ - --index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json + if [ "${{github.event.workflow_run.event}}" = "push" ]; then + python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \ + --run-attempt ${{github.run_attempt}} \ + --index zephyr-main-ci-push-1 artifacts/*/*/twister.json + elif [ "${{github.event.workflow_run.event}}" = "schedule" ]; then + python3 ./scripts/ci/upload_test_results_es.py -r ${run_date} \ + --run-attempt ${{github.run_attempt}} \ + --index zephyr-main-ci-weekly-1 artifacts/*/*/twister.json fi