From efdc9cc3d60affa5be0b785d9026060a7a548493 Mon Sep 17 00:00:00 2001 From: Antony Messerli Date: Tue, 7 Sep 2021 21:56:24 -0500 Subject: [PATCH] Add Discord Notificiations --- .github/workflows/build.yml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 560ed0f..ac0bbd8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -134,3 +134,16 @@ jobs: WITH_V: true RELEASE_BRANCHES: master + - name: "Set discord notification: success" + if: steps.version_check.outcome == 'success' && steps.version_check.conclusion == 'success' + run: | + TEMPLATE='[{"color": $color, "description": $desc}]' + DESC="__**Container Updated**__ \n**Container Name:** ${{ env.GITHUB_REPOSITORY }}\n**Version:** ${{ env.VERSION_TAG }}\n**Build:** https://github.com/${{ env.GITHUB_REPOSITORY }}/actions/runs/${{ env.GITHUB_RUN_ID }}\n**Status:** Success\n**Change:** https://github.com/${{ env.GITHUB_REPOSITORY }}/commit/${{ env.GITHUB_SHA }}\n" + echo "DISCORD_EMBEDS=$(jq -nc --arg color "1681177" --arg desc "$DESC" "$TEMPLATE")" >> $GITHUB_ENV + + - name: Discord notification + env: + DISCORD_WEBHOOK: ${{ secrets.DISCORD_HOOK_URL }} + DISCORD_AVATAR: https://api.microlink.io/?url=https://twitter.com/github&embed=image.url + DISCORD_USERNAME: Github + uses: Ilshidur/action-discord@0.3.2 \ No newline at end of file