Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AAE-28530 Fix teams notif status detection #839

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 24 additions & 1 deletion .github/actions/send-teams-notification/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,30 @@ runs:

- name: Compute workflow status
id: compute-workflow-status
uses: martialonline/workflow-status@fe13c6a4716673e224038aa1b02387352fb35e13 # v4
shell: bash
run: |
url="${GITHUB_API_URL}/repos"
repo="${GITHUB_REPOSITORY}"
run_id="${GITHUB_RUN_ID}"
token="${{ github.token }}"
atchertchian marked this conversation as resolved.
Show resolved Hide resolved

failure=$(curl -s -H "Authorization: token ${token}" "${url}/${repo}/actions/runs/${run_id}/jobs?per_page=100" | \
jq -r '.jobs[].steps[] | select(.status == "completed" and .conclusion == "failure").conclusion' | \
wc -l)

cancelled=$(curl -s -H "Authorization: token ${token}" "${url}/${repo}/actions/runs/${run_id}/jobs?per_page=100" | \
jq -r '.jobs[].steps[] | select(.status == "completed" and .conclusion == "cancelled").conclusion' | \
wc -l)

if [ "${failure}" -gt 0 ]; then
status="failure"
elif [ "${cancelled}" -gt 0 ]; then
status="cancelled"
else
status="success"
fi

echo "status=${status}" >> $GITHUB_OUTPUT

- name: Compute color
shell: bash
Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v8.6.2
v8.6.3
Loading