Attempt to change Push CI to workflow_run#17753
Merged
Conversation
|
The documentation is not available anymore as the PR was closed or merged. |
ydshieh
commented
Jun 17, 2022
Collaborator
Author
|
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 😄 ) |
Collaborator
Author
|
This works well, one good example to check is |
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
This is a fix for #17692 :
pushandworkflow_runevent typeworkflow_runevent triggered by a push tomainbranch, we still need to usegithub.event.workflow_run.head_shato get the correct SHA (otherwise, in the case where 2 PRs merged intomainin a very short time period, the first one will get the latest commit SHA)pushevent if the branch is NOTmain. 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_runcould be launched only when the PR is merged intomain, I hope there is no other unexpected issue in this PR 🙏.