From 894469cf5437ca3524f958c7e19b4c7c7e0a4996 Mon Sep 17 00:00:00 2001 From: wookie184 Date: Sun, 19 May 2024 22:50:39 +0100 Subject: Improve embed status action (#1532) --- .github/workflows/status_embed.yaml | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/status_embed.yaml b/.github/workflows/status_embed.yaml index d836aa8f..f90b211b 100644 --- a/.github/workflows/status_embed.yaml +++ b/.github/workflows/status_embed.yaml @@ -13,18 +13,6 @@ concurrency: jobs: status_embed: - # We send the embed in the following situations: - # - Always after the `Build` workflow, as it runs at the - # end of our workflow sequence regardless of status. - # - Always for the `pull_request` event, as it only - # runs one workflow. - # - Always run for non-success workflows, as they - # terminate the workflow sequence. - if: >- - (github.event.workflow_run.name == 'CI' && github.event.workflow_run.conclusion != 'skipped') || - github.event.workflow_run.event == 'pull_request' || - github.event.workflow_run.conclusion == 'failure' || - github.event.workflow_run.conclusion == 'cancelled' name: Send Status Embed to Discord runs-on: ubuntu-latest @@ -60,8 +48,14 @@ jobs: webhook_id: '784184528997842985' webhook_token: ${{ secrets.GHA_WEBHOOK_TOKEN }} - # Workflow information + # We need to provide the information of the workflow that + # triggered this workflow instead of this workflow. + workflow_name: ${{ github.event.workflow_run.name }} + run_id: ${{ github.event.workflow_run.id }} + run_number: ${{ github.event.workflow_run.run_number }} status: ${{ github.event.workflow_run.conclusion }} + sha: ${{ github.event.workflow_run.head_sha }} + pr_author_login: ${{ steps.pr_info.outputs.pr_author_login }} pr_number: ${{ steps.pr_info.outputs.pr_number }} pr_title: ${{ steps.pr_info.outputs.pr_title }} -- cgit v1.2.3