close
The Wayback Machine - https://web.archive.org/web/20240324125113/https://github.com/github/docs/issues/799
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GitHub Actions: add more details for "workflow_run" event #799

Closed
BrightRan opened this issue Oct 26, 2020 · 9 comments · Fixed by #2062
Closed

GitHub Actions: add more details for "workflow_run" event #799

BrightRan opened this issue Oct 26, 2020 · 9 comments · Fixed by #2062
Assignees
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team

Comments

@BrightRan
Copy link

BrightRan commented Oct 26, 2020

Associated GitHub Community: https://github.community/t/workflow-run-not-working-as-expected/139342

According to the docs about the workflow_run event, we can use the workflow_run event to trigger another workflow after a workflow run is requested or completed.

According to our tests, the workflow_run event can trigger the workflow only when the workflow file is on the default branch. However, we can't see any note about this point in the docs.

We can see the below note for some events (such as issues, label, etc.) in the docs:

Note: This event will only trigger a workflow run if the workflow file is on the default branch.

But why you did not add the same Note for the workflow_run event. This Note also is applied to the workflow_run event.

@github-actions github-actions bot added the triage Do not begin working on this issue until triaged by the team label Oct 26, 2020
@github-actions github-actions bot added this to Triage in Docs open source board Oct 26, 2020
@janiceilene
Copy link
Contributor

👋 @BrightRan Thanks so much for opening an issue! Does this Add more details about workflow_run PR cover the information you're looking for?

@BrightRan
Copy link
Author

Yes, that's what we want.
Thanks, @janiceilene .

@alexpapworth
Copy link

Hiya, I feel like this is still an issue. As of today (18th November) the workflow_run section doesn't explicitly state that it won't run until you've merged the workflow file into the default branch.


Screenshot 2020-11-18 at 11 39 31


Would be great if we can add the same "Note:" section, similar to what we have on the check_run event.


Screenshot 2020-11-18 at 11 49 05


@janiceilene
Copy link
Contributor

👋 @BrightRan I'll triage this for the team to take a look 👀

@janiceilene janiceilene moved this from Triage to Ecosystem in Docs open source board Nov 18, 2020
@janiceilene janiceilene added actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team and removed triage Do not begin working on this issue until triaged by the team labels Nov 18, 2020
@lucascosti lucascosti self-assigned this Dec 14, 2020
Docs open source board automation moved this from Ecosystem to Done Dec 14, 2020
@lucascosti
Copy link
Contributor

@alexpapworth
Copy link

Thanks Lucas 😊

@Morriz
Copy link

Morriz commented Mar 10, 2021

Where can we find the documentation that describes the github.event.workflow_run object? It has many properties but I don't find docs on that.

@Morriz
Copy link

Morriz commented Mar 10, 2021

Of course I saw the https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#workflow_run docs, but those fail to mention these extra properties. One I know of is:

github.event.workflow_run.conclusion

So what else exists on github.event.workflow_run.?

TomPohys pushed a commit to openmaptiles/openmaptiles that referenced this issue Aug 27, 2021
Fixes #948 

This PR does the following:
1. Changes the trigger for the PR comment updater from the cron method to workflow_run, triggered on completion of the test cases.  This should remove the delay between the completion of the performance tests and the updating of the corresponding comment in the PR.
2. Separates the integrity check and performance check into separate workflows and allows them to run in parallel.  This will allow the project to take advantage of multiple CI runners if they're available (which appears to be the case).

In addition, this fixes an issue with post-merge undeleted/updated branches on PRs.  The current "cron" method causes the CI to run the pr-update job over and over forever, unnecessarily.

As described in github/docs#799, and the [github docs](https://docs.github.com/en/actions/reference/events-that-trigger-workflows#workflow_run), a `workflow_run` trigger will only fire when the workflow file is on the main branch.  Thus, this change will not fire the PR updater on this PR.  Thus there's no way to test this working properly without merging onto master and then testing on one of the other PRs.
@santhoshbackup
Copy link

i got webhook payload not exist error while using workflow_run.
can someone help with me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
actions This issue or pull request should be reviewed by the docs actions team content This issue or pull request belongs to the Docs Content team ecosystem This issue or pull request should be reviewed by the Docs Ecosystem team
Development

Successfully merging a pull request may close this issue.

6 participants