diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d5eaefd..220e910 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -58,11 +58,22 @@ jobs: notification: name: Notification - if: ${{ always() }} + if: always() && github.event_name != 'pull_request' needs: [lint, test] runs-on: ubuntu-latest timeout-minutes: 5 steps: + - name: Check Job Success + run: | + if [ ${{ needs.lint.result }} == 'success' ] && [ ${{ needs.test.result }} == 'success' ]; then + echo "All jobs succeeded" + echo "jobSuccess=success" >> $GITHUB_ENV + else + echo "Not all jobs succeeded" + echo "jobSuccess=fail" >> $GITHUB_ENV + fi + id: print_status + - name: Webex Notification if: always() uses: qsnyder/action-wxt@master @@ -70,7 +81,7 @@ jobs: TOKEN: ${{ secrets.WEBEX_TOKEN }} ROOMID: ${{ secrets.WEBEX_ROOM_ID }} MESSAGE: | - [**[${{ job.status }}] ${{ github.repository }} #${{ github.run_number }}**](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) + [**[${{ env.jobSuccess }}] ${{ github.repository }} #${{ github.run_number }}**](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) * Commit: [${{ github.event.head_commit.message }}](${{ github.event.head_commit.url }})[${{ github.event.pull_request.title }}](${{ github.event.pull_request.html_url }}) * Author: ${{ github.event.sender.login }} * Branch: ${{ github.ref }} ${{ github.head_ref }}