-
Notifications
You must be signed in to change notification settings - Fork 11
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
Allow users to provide essential information (PR number, sha, etc.) when running on non-pull_request contexts #206
Comments
I think I found the reason, that tfaga may not support repository_dispatch. To verify this bug, I created two workflow files, they are very simple and basically identical, but one is triggered by issue comment, another is triggered by repository_dispatch.
|
The action doesn't currently support the |
@jamacku Thanks, do you have plan to add support for repository_dispatch trigger recently? Our CI need this. |
@yih-redhat Currently now, we do not have a capacity to implement |
In case you want to report anything, in status, you have to allow it. It is not enabled by default. See https://github.com/sclorg/testing-farm-as-github-action?tab=readme-ov-file#miscellaneous and enable |
No, it's not about I have used tfaga in another project, and enabled |
File issue in issue.redhat.com? for which component? |
This should be easy to fix. I'll try to have a look soonish. |
Sorry, my mistake. I thought, that this is pull request. |
I am still thinking whether this option is really needed in our action? What is use case? I read GitHub event https://docs.github.com/en/webhooks/webhook-events-and-payloads#repository_dispatch. What about serializing the action? |
Sometimes, a github project CI env can be complicated. It may need to trigger a workflow from outside github, or it may need to trigger another workflow when current workflow finished. In all these cases, repository_dispatch is a better solution. In my case, our upstream project is https://github.com/osbuild/osbuild-composer , and as a github project, it uses gitlab CI to build and upload rpm packages for all the OS versions when a new pull request is created. I need to trigger tfaga test after gitlab CI finished build/upload. |
@yih-redhat, I have submitted PR that should fix your issue. Could you please test it with your setup? PR: #207 |
Thanks @jamacku , could you please let me know the steps to test this pr? I usually use tfaga in my workflow file like this, I don't know how to test this pr.
|
@yih-redhat, you can test it by using my fork and branch with the fix ( uses: jamacku/testing-farm-as-github-action@dispatch
# ... |
Trying now, will keep you posted. |
@jamacku Your fix works as expected, thanks! The pull request is osbuild/osbuild-composer#4240 , and this pr triggered the workflow in https://github.com/osbuild/rhel-edge-ci, the action log is https://github.com/osbuild/rhel-edge-ci/actions/runs/9991173802 |
I still need tfaga to be able to update the pull request status when it is triggered by repository_dispatch. I will file another issue for this with more details. |
Please don't create a new issue. We can discuss it here. When you run it as' repository_dispatch, ' we don't know which PR to update. You have to provide the PR number when calling repository_dispatch. |
Yes, I can provide target repo name, PR number or sha number, and then tfaga can update the pull request status. I don't know how tfaga update the pull request status, but before we use tfaga, we use this plugin to create the test status in target pull request. Here is the example for your reference. I suppose tfaga needs at least the repo name, the pr number or sha number and a valid github_token to do this. |
Yes, we need: Are you able to provide this information to us when triggering |
Yes, I can provide this information. Actually anyone who uses repository_dispatch to trigger tfaga should be able to provide this information, as he knows all the information of original repo and pr. |
Great, I'll add inputs for your usecase. |
@jamacku Can I get a pr to test in this week? |
I'll try to provide testing PR by the end of the week. |
Type of issue
None
Description
Workflow file is at: https://github.com/osbuild/rhel-edge-ci/blob/main/.github/workflows/rhel-95.yml
Test result is at: https://github.com/osbuild/rhel-edge-ci/actions/runs/9885421251
Workflow file is at: https://github.com/osbuild/rhel-edge-ci/blob/main/.github/workflows/test.yml
Test result is at: https://github.com/osbuild/rhel-edge-ci/actions/runs/9885421253
Reproducer
No response
The text was updated successfully, but these errors were encountered: