From 6cab2de946a36c9b4d4eaaa1370293e439eb2ce6 Mon Sep 17 00:00:00 2001 From: Alexander Bulychev Date: Thu, 25 Jan 2024 13:05:01 +0400 Subject: [PATCH] CI: optimize notification steps (#26486) Co-authored-by: Alexander Bulychev --- .github/workflows/devextreme_npm_tests.yml | 3 +-- .github/workflows/lint.yml | 3 +-- .github/workflows/paths.yml | 3 +-- .github/workflows/qunit_tests-additional-renovation.yml | 3 +-- .github/workflows/qunit_tests-renovation.yml | 3 +-- .github/workflows/renovation.yml | 3 +-- .github/workflows/styles.yml | 3 +-- .github/workflows/testcafe_tests.yml | 3 +-- .github/workflows/themebuilder_tests.yml | 3 +-- .github/workflows/ts_declarations.yml | 3 +-- 10 files changed, 10 insertions(+), 20 deletions(-) diff --git a/.github/workflows/devextreme_npm_tests.yml b/.github/workflows/devextreme_npm_tests.yml index c4bd841e5d38..fb041fe845aa 100644 --- a/.github/workflows/devextreme_npm_tests.yml +++ b/.github/workflows/devextreme_npm_tests.yml @@ -219,7 +219,7 @@ jobs: - build - test_bundlers - test_demos - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -228,4 +228,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index aa2d8c6fc9c4..d4ab2bf491ae 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -268,7 +268,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [Renovation, TS, JS, CSS, texts, package_lock, component_exports] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -277,4 +277,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/paths.yml b/.github/workflows/paths.yml index 53cd1a18a379..bb756e895c84 100644 --- a/.github/workflows/paths.yml +++ b/.github/workflows/paths.yml @@ -39,7 +39,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [checks] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -48,4 +48,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/qunit_tests-additional-renovation.yml b/.github/workflows/qunit_tests-additional-renovation.yml index 8f7cbec4d6a4..2629a1809425 100644 --- a/.github/workflows/qunit_tests-additional-renovation.yml +++ b/.github/workflows/qunit_tests-additional-renovation.yml @@ -250,7 +250,7 @@ jobs: qunit-tests-firefox, qunit-tests-no-csp ] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -259,4 +259,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/qunit_tests-renovation.yml b/.github/workflows/qunit_tests-renovation.yml index a47a2d3df4ce..50e703182139 100644 --- a/.github/workflows/qunit_tests-renovation.yml +++ b/.github/workflows/qunit_tests-renovation.yml @@ -78,7 +78,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [build, qunit-tests] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -87,4 +87,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/renovation.yml b/.github/workflows/renovation.yml index 1e2fc6b55923..223164f58aa8 100644 --- a/.github/workflows/renovation.yml +++ b/.github/workflows/renovation.yml @@ -49,7 +49,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [jest-tests] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -58,4 +58,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/styles.yml b/.github/workflows/styles.yml index c9d55602c17c..53b0fd0b6988 100644 --- a/.github/workflows/styles.yml +++ b/.github/workflows/styles.yml @@ -42,7 +42,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [Tests] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -51,4 +51,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/testcafe_tests.yml b/.github/workflows/testcafe_tests.yml index ead60e17f581..3076427450fe 100644 --- a/.github/workflows/testcafe_tests.yml +++ b/.github/workflows/testcafe_tests.yml @@ -172,7 +172,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [build, testcafe] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -181,4 +181,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/themebuilder_tests.yml b/.github/workflows/themebuilder_tests.yml index 075a1259615d..09b9c1b10662 100644 --- a/.github/workflows/themebuilder_tests.yml +++ b/.github/workflows/themebuilder_tests.yml @@ -52,7 +52,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [test] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -61,4 +61,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1 diff --git a/.github/workflows/ts_declarations.yml b/.github/workflows/ts_declarations.yml index bd88e4467d91..50e1a0b4c788 100644 --- a/.github/workflows/ts_declarations.yml +++ b/.github/workflows/ts_declarations.yml @@ -109,7 +109,7 @@ jobs: runs-on: devextreme-shr2 name: Send notifications needs: [check-ts-bundle, validate-declarations, check-ts-compilation] - if: always() && contains(needs.*.result, 'failure') + if: github.event_name != 'pull_request' && contains(needs.*.result, 'failure') steps: - uses: actions/checkout@v4 @@ -118,4 +118,3 @@ jobs: hook_url: ${{secrets.TEAMS_ALERT}} bearer_token: ${{secrets.GITHUB_TOKEN}} specific_repo: DevExpress/DevExtreme - specific_branch: 24_1