ci: use reuse workflow for send email on fail#680
Conversation
Signed-off-by: Ray Huang <bjhuang@cs.nycu.edu.tw>
yungyuc
left a comment
There was a problem hiding this comment.
This looks good. I like the modularization.
@chestercheng, please take a look.
There was a problem hiding this comment.
I wonder if the action should use a version.
There was a problem hiding this comment.
Based on the reference, it states:
- {owner}/{repo}/.github/workflows/{filename}@{ref} for reusable workflows in public and private repositories.
- ./.github/workflows/{filename} for reusable workflows in the same repository.
Since we are using a workflow within the same repository, we do not need to specify @{ref} (such as a specific commit SHA, release tag, or branch name).
Regarding the reusable workflow YAML file itself, the official documentation doesn't mention specifying a version inside the file. I think it simply follows the repository’s version control.
There was a problem hiding this comment.
Thanks for the clarification. In our case, which uses the action within the same repository, it makes more sense to follow the latest checkin (repository version control).
We should not use a version. I like this conclusion.
|
Merged. Discussion can continue. |
To remove duplicate steps in CI which is mentioned in #677, I use reuse workflows provided by Github to combine sending email on failure ones.
With this PR, we only need to maintain one workflow about email sending and other workflows only need to reuse it.
I have tested this on my local fork and ensure it works (ref). And the email body looks like below:
