From fdc423607f8e018cfca7d836eca99951320bec16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niko=20K=C3=B6ser?= Date: Fri, 19 Jun 2020 03:31:59 +0200 Subject: [PATCH] ci: add discord bot --- .github/discord_notify_push.yml | 18 ++++++++++++++++++ README.md | 1 + 2 files changed, 19 insertions(+) create mode 100644 .github/discord_notify_push.yml diff --git a/.github/discord_notify_push.yml b/.github/discord_notify_push.yml new file mode 100644 index 00000000..6f4b8904 --- /dev/null +++ b/.github/discord_notify_push.yml @@ -0,0 +1,18 @@ +name: discord_notification + +on: [push, pull_request, release] + +jobs: + notify: + runs-on: ubuntu-latest + steps: + - name: Discord Notify + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} + uses: Ilshidur/action-discord@master + with: + args: | + '[![Avatar not found]({{ EVENT_PAYLOAD.sender.avatar_url }})]({{ EVENT_PAYLOAD.sender.html_url }}) [{{ EVENT_PAYLOAD.sender.login }}]({{ EVENT_PAYLOAD.sender.html_url }})' + '`{{ EVENT_PAYLOAD.action }}`: {{ EVENT_PAYLOAD.name }}' + '`[{{ EVENT_PAYLOAD.check_run.head_sha }}]({{ EVENT_PAYLOAD.check_run.html_url }})`' + '{{ EVENT_PAYLOAD.check_run.status }} {{ EVENT_PAYLOAD.check_run.completed_at }}' diff --git a/README.md b/README.md index 3cb077d5..86e79d50 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ [![Go Report Card](https://goreportcard.com/badge/github.com/nikoksr/proji)](https://goreportcard.com/report/github.com/nikoksr/proji) [![CircleCI](https://circleci.com/gh/nikoksr/proji.svg?style=shield)](https://circleci.com/gh/nikoksr/proji) [![codecov](https://codecov.io/gh/nikoksr/proji/branch/master/graph/badge.svg)](https://codecov.io/gh/nikoksr/proji) +[![Discord](https://img.shields.io/discord/723332758579183718?color=blue&label=discord)](https://discord.gg/gWM9Vr) ![Platforms](https://img.shields.io/badge/platforms-Windows%2C%20macOS%20and%20Linux-blue) [![go.dev reference](https://img.shields.io/badge/go.dev-reference-007d9c?logo=go&logoColor=white&style=flat)](https://pkg.go.dev/github.com/nikoksr/proji) [![License](https://img.shields.io/badge/license-MIT-blue.svg)](/LICENSE)