From 79f4a25cd643194aaecd5192074d7d1ec7dc1cb0 Mon Sep 17 00:00:00 2001 From: KobeW50 <84587632+KobeW50@users.noreply.github.com> Date: Sun, 11 Aug 2024 11:00:25 -0400 Subject: [PATCH] fix: Sample code in `README.md` (#546) * fix: `nodetail` code sample * Upload new sample image * Revert "Upload new sample image" This reverts commit ffadf681deb61ff64bbf06cbd8a758987e30bfe6. * Match sample code with existing image * Use correct webhook field * Fix syntax in sample code * Use dynamic code in Markdown sample * Use single variable for release link Co-authored-by: Takakazu Fu * Use single variable for release link Co-authored-by: Takakazu Fu --------- Co-authored-by: Takakazu Fu --- README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 9905f840..6b73be66 100644 --- a/README.md +++ b/README.md @@ -51,11 +51,13 @@ Post GitHub Actions status to Discord as an beautiful embed ```yaml - uses: sarisia/actions-status-discord@v1 if: always() - env: - DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} with: + webhook: ${{ secrets.DISCORD_WEBHOOK }} nodetail: true - title: "We did it!" + title: "New version of `software` is ready!" + description: | + Version `${{ github.event.release.tag_name }}` + Click [here](${{ github.event.release.html_url }}) to download! color: 0xff91a4 ``` @@ -128,10 +130,11 @@ Some fields support markdown syntax. with: webhook: ${{ secrets.DISCORD_WEBHOOK }} nodetail: true - title: New version of `software` is ready! + title: "New version of `software` is ready!" description: | - Version `1.2.3-alpha` - Click [here](https://github.com/sarisia/actions-status-discord) to download! + Version `${{ github.event.release.tag_name }}` + Click [here](${{ github.event.release.html_url }}) to download! + color: 0xff91a4 ``` ![image](https://user-images.githubusercontent.com/33576079/212482315-52429bbd-b7b9-456a-8ee8-ee26aa2a0fb1.png)