|
7 | 7 | types:
|
8 | 8 | - completed
|
9 | 9 |
|
| 10 | +concurrency: |
| 11 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 12 | + cancel-in-progress: true |
| 13 | + |
10 | 14 | jobs:
|
11 | 15 | status_embed:
|
12 |
| - # We need to send a status embed whenever the workflow |
13 |
| - # sequence we're running terminates. There are a number |
14 |
| - # of situations in which that happens: |
15 |
| - # |
16 |
| - # 1. We reach the end of the Deploy workflow, without |
17 |
| - # it being skipped. |
18 |
| - # |
19 |
| - # 2. A `pull_request` triggered a Lint & Test workflow, |
20 |
| - # as the sequence always terminates with one run. |
21 |
| - # |
22 |
| - # 3. If any workflow ends in failure or was cancelled. |
23 |
| - if: >- |
24 |
| - (github.event.workflow_run.name == 'Deploy' && github.event.workflow_run.conclusion != 'skipped') || |
25 |
| - github.event.workflow_run.event == 'pull_request' || |
26 |
| - github.event.workflow_run.conclusion == 'failure' || |
27 |
| - github.event.workflow_run.conclusion == 'cancelled' |
28 | 16 | name: Send Status Embed to Discord
|
29 | 17 | runs-on: ubuntu-latest
|
30 | 18 |
|
@@ -60,14 +48,12 @@ jobs:
|
60 | 48 | webhook_id: '784184528997842985'
|
61 | 49 | webhook_token: ${{ secrets.GHA_WEBHOOK_TOKEN }}
|
62 | 50 |
|
63 |
| - # Workflow information |
| 51 | + # We need to provide the information of the workflow that |
| 52 | + # triggered this workflow instead of this workflow. |
64 | 53 | workflow_name: ${{ github.event.workflow_run.name }}
|
65 | 54 | run_id: ${{ github.event.workflow_run.id }}
|
66 | 55 | run_number: ${{ github.event.workflow_run.run_number }}
|
67 | 56 | status: ${{ github.event.workflow_run.conclusion }}
|
68 |
| - actor: ${{ github.actor }} |
69 |
| - repository: ${{ github.repository }} |
70 |
| - ref: ${{ github.ref }} |
71 | 57 | sha: ${{ github.event.workflow_run.head_sha }}
|
72 | 58 |
|
73 | 59 | pr_author_login: ${{ steps.pr_info.outputs.pr_author_login }}
|
|
0 commit comments