From 56128f2d3f417d47771a3378bc227ed6845425a4 Mon Sep 17 00:00:00 2001 From: Ludovic Cartier Date: Mon, 2 Sep 2024 18:43:29 +0200 Subject: [PATCH] actions - add notification --- .gitea/workflows/build.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 303e58c..f36d746 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -22,5 +22,22 @@ jobs: # files: |- # _site/** # token: "${{ secrets.RELEASE_TOKEN }}" - + notification: + runs-on: ubuntu-latest + needs: build + steps: + - name: create payload var + runs: | + PAYLOAD=$(cat << EOF + payload={ + \"username\": \"gitea-bot\", + \"icon_url\": \"https://icinga.com/wp-content/uploads/2017/08/icon-core.png\", + \"text\": \"mkdocs build has just finished !\" + } + EOF + ) + id: my_payload + - name: curl webhook + runs: | + curl --connect-timeout 30 --max-time 60 -s -S -X POST --data-urlencode "${{ env.PAYLOAD }}" "${{ secrets.WEBHOOK_URL }}"