Add machine type in the artifact of Examples directory job (#18459)

Co-authored-by: ydshieh <ydshieh@users.noreply.github.com>
This commit is contained in:
Yih-Dar
2022-08-04 18:52:01 +02:00
committed by GitHub
parent f9a0008d2d
commit d2704c4143
2 changed files with 10 additions and 5 deletions

View File

@@ -448,7 +448,12 @@ class Message:
content = {"type": "section", "text": {"type": "mrkdwn", "text": text}}
if job_result["job_link"] is not None:
# TODO: Make sure we always have a valid job link (or at least a way not to break the report sending)
# Currently we get the device from a job's artifact name.
# If a device is found, the job name should contain the device type, for example, `XXX (single-gpu)`.
# This could be done by adding `machine_type` in a job's `strategy`.
# (If `job_result["job_link"][device]` is `None`, we get an error: `... [ERROR] must provide a string ...`)
if job_result["job_link"] is not None and job_result["job_link"][device] is not None:
content["accessory"] = {
"type": "button",
"text": {"type": "plain_text", "text": "GitHub Action job", "emoji": True},