Skip to content

Commit ea62062

Browse files
authored
Fix API test slack notification (#65)
1 parent 7124fd6 commit ea62062

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.github/workflows/api.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ jobs:
105105
needs: [api]
106106
secrets: inherit
107107
with:
108+
state: ${{ needs.api.result }}
108109
workflow_name: BE API
109110
workflow_id: ${{ inputs.id }}
110111
workflow_reusable_name: "run_api_be"

.github/workflows/notify_slack.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,26 @@ on:
4040
description: Name of the report file
4141
type: string
4242
required: true
43+
state:
44+
description: Check state to set
45+
type: string
46+
required: false
47+
default: ""
4348
jobs:
4449
slack_notify:
4550
name: sdp-test-report
4651
runs-on: ubuntu-latest
4752
if: always()
4853
steps:
54+
- name: Set explicitly provided workflow state
55+
if: ${{ inputs.state != '' }}
56+
run: |
57+
echo "WORKFLOW_CONCLUSION=${{ inputs.state }}" >> $GITHUB_ENV
4958
- name: Wait 15s for previous jobs to conclude
59+
if: ${{ inputs.state == '' }}
5060
run: sleep 15
5161
- uses: dpc-sdp/workflow-conclusion-action@main
62+
if: ${{ inputs.state == '' }}
5263
with:
5364
JOB_ID: ${{ inputs.workflow_id }}
5465
REUSABLE_WORKFLOW_NAME: ${{ inputs.workflow_reusable_name }}

0 commit comments

Comments
 (0)