From d7c17e9486818d6f3792158839ed48739e95b3e7 Mon Sep 17 00:00:00 2001 From: Geoff Bourne Date: Thu, 20 Jan 2022 20:21:38 -0600 Subject: [PATCH] ci: Reference branch and html URL from completed workflow in discord workflow --- .github/workflows/discord.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/discord.yml b/.github/workflows/discord.yml index 844be0add99..e4e6b42b66b 100644 --- a/.github/workflows/discord.yml +++ b/.github/workflows/discord.yml @@ -8,7 +8,6 @@ on: env: DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} - GITHUB_WORKFLOW_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.event.workflow_run.id }} jobs: discord: @@ -19,9 +18,9 @@ jobs: if: ${{ github.event.workflow_run.conclusion == 'success' }} uses: Ilshidur/action-discord@master with: - args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.ref }}\n- [Link: to Actions](<${{ env.GITHUB_WORKFLOW_URL }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏" + args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🎉 ${{ github.event.workflow_run.conclusion }} 🍏" - name: on-failure if: ${{ github.event.workflow_run.conclusion == 'failure' }} uses: Ilshidur/action-discord@master with: - args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.ref }}\n- [Link: to Actions](<${{ env.GITHUB_WORKFLOW_URL }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥" + args: "Github repo: ${{ github.repository }}\n- Branch: ${{ github.event.workflow_run.head_branch }}\n- [Link: to Actions](<${{ github.event.workflow_run.html_url }}>)\n- Status: 🤔 ${{ github.event.workflow_run.conclusion }} 💣💥"