Attempt to change Push CI to workflow_run
# What does this PR do?

This is a fix for #17692 :

- Use the correct properties to get the information (branch/commit-SHA, etc.) for both `push` and `workflow_run` event type 
  - Even if we consider only the `workflow_run` event triggered by a push to `main` branch, we still need to use `github.event.workflow_run.head_sha` to get the correct SHA (otherwise, in the case where 2 PRs merged into `main` in a very short time period, the first one will get the latest commit SHA)
  - Currently, the push CI could still be triggered by `push` event if the branch is **NOT** `main`. The main purpose is for testing a particular branch. This is why I need to consider both event type.

**NOTE**: I have verified the change extensively in my own (dummy) repo. However, the part regarding the actual CI tests + the part of slack report are not verified. **The part regarding preparing the necessary information for slack report is verified.** Since the `workflow_run` could be launched only when the PR is merged into `main`, I hope there is no other unexpected issue in this PR 🙏.



_The documentation is not available anymore as the PR was closed or merged._<|||||>I will merge this tomorrow (so unlikely to have other PRs merged), and revert it if anything breaks (hopefully not, I am running out of ideas 😄 )<|||||>This works well, one good example to check is

[TF: BART compatible with XLA generation](https://github.com/huggingface/transformers/commit/132402d752044301b37e54405832738b16f49df6)