diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 91b2b38..adb36c0 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -33,6 +33,18 @@ jobs: SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }} SIGNING_SECRET_KEY_RING_FILE: ${{ secrets.SIGNING_SECRET_KEY_RING_FILE }} run: ./gradlew publishToSonatype closeAndReleaseSonatypeStagingRepository + - name: Slack Notify + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_ICON: "https://raw.githubusercontent.com/github/explore/2c7e603b797535e5ad8b4beb575ab3b7354666e1/topics/actions/actions.png" + SLACK_USERNAME: "GitHub Alerts" + SLACK_CHANNEL: "#grpc-client-repo-alerts" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_COLOR: ${{ job.status }} + SLACK_MESSAGE: "Publish failure" + SLACK_FOOTER: "Clarifai Java GRPC Repo" + publish-github-release: needs: publish-maven name: Create Release diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml index fec2b41..984571a 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -33,3 +33,14 @@ jobs: python scripts/app_and_key_for_tests.py --create-workflow ${CLARIFAI_API_KEY} ./gradlew test --tests *Grpc*Test ./gradlew test --tests *Json*Test + - name: Slack Notify + if: ${{ failure() }} + uses: rtCamp/action-slack-notify@v2 + env: + SLACK_ICON: "https://raw.githubusercontent.com/github/explore/2c7e603b797535e5ad8b4beb575ab3b7354666e1/topics/actions/actions.png" + SLACK_USERNAME: "GitHub Alerts" + SLACK_CHANNEL: "#grpc-client-repo-alerts" + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + SLACK_COLOR: ${{ job.status }} + SLACK_MESSAGE: "Test failure" + SLACK_FOOTER: "Clarifai Java GRPC Repo"