From 0f1bb5cff5587dda96a2f17c60fae1327aab4bdc Mon Sep 17 00:00:00 2001 From: Kostas Stamatakis Date: Thu, 28 Mar 2024 11:32:49 +0200 Subject: [PATCH] fix ci results comment --- .github/workflows/ci.yml | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4b4f1664db..2efd6dd2cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,7 +1,7 @@ name: Tests on: - pull_request_target: + pull_request: branches: - main - "[0-9]+.[0-9]+" @@ -318,8 +318,8 @@ jobs: if: ${{ success() || failure() }} shell: bash run: | - ls -lahR || true - rm -f tests/allure/results/cover.out || true + ls -lahR tests/allure/results/ || true + echo "event_name: ${{ github.event_name }}" - name: Publish allure report if: ${{ success() || failure() }} @@ -334,7 +334,7 @@ jobs: resultsGlob: "tests/allure/results" updatePr: actions collapseSummary: false - summary: suites + summary: packages summaryTableType: markdown copyLatest: true bucket: csp-allure-reports @@ -343,7 +343,7 @@ jobs: debug: false - name: Allure Summary - if: ${{ success() && github.event_name == 'pull_request' }} + if: ${{ success() && github.event_name != 'push' }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -354,8 +354,6 @@ jobs: ./.ci/scripts/allure-report-summary.sh "$allure_result" "$allure_url" allure_summary=$(./.ci/scripts/allure-report-summary.sh "$allure_result" "$allure_url") - # posting result into job summary - echo "$allure_summary" >> $GITHUB_STEP_SUMMARY # saving result into env variable (with multiline handling) echo "ALLURE_SUMMARY<> $GITHUB_ENV @@ -364,7 +362,7 @@ jobs: - name: Comment test success result uses: marocchino/sticky-pull-request-comment@v2 - if: ${{ success() && github.event_name == 'pull_request' }} + if: ${{ success() && github.event_name != 'push' }} with: header: CI Test Results number: ${{ github.event.number }}