(args)
| 26 | |
| 27 | |
| 28 | def main(args): |
| 29 | action_url = f"https://github.com/{GITHUB_REPO}/actions/runs/{GITHUB_RUN_ID}" |
| 30 | if args.status == "success": |
| 31 | hub_path = "https://huggingface.co/datasets/diffusers/benchmarks/blob/main/collated_results.csv" |
| 32 | message = ( |
| 33 | "✅ New benchmark workflow successfully run.\n" |
| 34 | f"🕸️ GitHub Action URL: {action_url}.\n" |
| 35 | f"🤗 Check out the benchmarks here: {hub_path}." |
| 36 | ) |
| 37 | else: |
| 38 | message = ( |
| 39 | "❌ Something wrong happened in the benchmarking workflow.\n" |
| 40 | f"Check out the GitHub Action to know more: {action_url}." |
| 41 | ) |
| 42 | |
| 43 | payload = {"text": message} |
| 44 | response = requests.post(SLACK_WEBHOOK_URL, json=payload) |
| 45 | |
| 46 | if response.status_code == 200: |
| 47 | print("Notification sent to Slack successfully.") |
| 48 | else: |
| 49 | print("Failed to send notification to Slack.") |
| 50 | |
| 51 | |
| 52 | if __name__ == "__main__": |
no outgoing calls
no test coverage detected