diff --git a/.github/workflows/samples.yml b/.github/workflows/samples.yml index 2fd7e9b90..94e9949f1 100644 --- a/.github/workflows/samples.yml +++ b/.github/workflows/samples.yml @@ -6,6 +6,9 @@ on: branches: - main pull_request: + schedule: + - cron: "0 0 * * *" + workflow_dispatch: jobs: examples: @@ -71,3 +74,20 @@ jobs: - name: Compile sample working-directory: ./sample run: npx tsc + notifications: + name: Regression notifications + runs-on: ubuntu-latest + needs: + - examples + - samples + if: ${{ !success() && github.ref == 'refs/heads/main' && github.event_name != 'workflow_dispatch' }} + steps: + - name: Send notifications of failing tests + uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1 + with: + errors: true + webhook: ${{ secrets.SLACK_REGRESSION_FAILURES_WEBHOOK_URL }} + webhook-type: webhook-trigger + payload: | + action_url: "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + repository: "${{ github.repository }}"