From 80a9a6125182550c9c1486d0152532ba625a4ec0 Mon Sep 17 00:00:00 2001 From: Alberto Xamin Date: Thu, 19 Aug 2021 10:36:28 +0300 Subject: [PATCH] add discord notifications --- .github/workflows/dev-image.yml | 9 +++++++++ .github/workflows/docker-image.yml | 9 +++++++++ .github/workflows/test-backend.yml | 11 ++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/.github/workflows/dev-image.yml b/.github/workflows/dev-image.yml index 682b03a..804de0d 100644 --- a/.github/workflows/dev-image.yml +++ b/.github/workflows/dev-image.yml @@ -71,3 +71,12 @@ jobs: name: Inspect image run: | docker buildx imagetools inspect albertoxamin/bang:dev + + - name: Notify discord + uses: th0th/notify-discord@v0.4.1 + if: ${{ always() }} + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_JOB_NAME: "Docker image :dev" + GITHUB_JOB_STATUS: ${{ job.status }} diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index e1e8d95..e71f70b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -61,3 +61,12 @@ jobs: name: Inspect image run: | docker buildx imagetools inspect albertoxamin/bang:latest + + - name: Notify discord + uses: th0th/notify-discord@v0.4.1 + if: ${{ always() }} + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_JOB_NAME: "Docker image main :latest" + GITHUB_JOB_STATUS: ${{ job.status }} diff --git a/.github/workflows/test-backend.yml b/.github/workflows/test-backend.yml index 4784c16..d65b822 100644 --- a/.github/workflows/test-backend.yml +++ b/.github/workflows/test-backend.yml @@ -25,4 +25,13 @@ jobs: if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Test with pytest run: | - python -m pytest \ No newline at end of file + python -m pytest -p no:warnings + + - name: Notify discord + uses: th0th/notify-discord@v0.4.1 + if: ${{ always() }} + env: + DISCORD_WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK_URL }} + GITHUB_ACTOR: ${{ github.actor }} + GITHUB_JOB_NAME: "Backend tests" + GITHUB_JOB_STATUS: ${{ job.status }}