From 7f299e3d4865292a8a271b90df52344f40ea76f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Iv=C3=A1n=20Ovejero?= Date: Tue, 1 Aug 2023 13:03:46 +0200 Subject: [PATCH] ci: Move notify-on-failure to own job --- .github/workflows/ci-master.yml | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci-master.yml b/.github/workflows/ci-master.yml index 8ecd17a7c48..a713a0f5d32 100644 --- a/.github/workflows/ci-master.yml +++ b/.github/workflows/ci-master.yml @@ -42,15 +42,6 @@ jobs: ./packages key: ${{ github.sha }}-base:18-test-lint - - name: Notify Slack on failure - uses: act10ns/slack@v2.0.0 - if: failure() - with: - status: ${{ job.status }} - channel: '#updates-build-alerts' - webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} - message: Master branch (build or test or lint) failed (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) - unit-test: name: Unit tests runs-on: ubuntu-latest @@ -124,3 +115,14 @@ jobs: env: ESLINT_PLUGIN_DIFF_COMMIT: ${{ github.event.pull_request.base.ref }} run: pnpm lint + + notify-on-failure: + name: Notify Slack on failure + needs: [unit-test, lint] + uses: act10ns/slack@v2.0.0 + if: failure() + with: + status: ${{ job.status }} + channel: '#updates-build-alerts' + webhook-url: ${{ secrets.SLACK_WEBHOOK_URL }} + message: Master branch (build or test or lint) failed (${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})