uet icon indicating copy to clipboard operation
uet copied to clipboard

[Mike Seese] GitHub Executor for `uet build`

Open hach-que opened this issue 1 year ago • 3 comments

While I understand Redpoint is well invested in the GitLab ecosystem and that this feature request may not come without contribution, I definitely would love to use this tool in GitHub Actions. I believe this requires a github executor for uet build (not sure since the documentation for CI/CD hasn't been written yet, so please correct me if I'm wrong).

hach-que avatar Oct 31 '24 06:10 hach-que

I have investigated this, and I don't believe it's possible to implement a GitHub Actions executor.

The problem is that GitHub does not support dynamically generating workflow YAML files and executing them. The closest you can get is dynamically generating a list of entries for matrix (see https://github.com/orgs/community/discussions/17245). However, we not only need to generate a list of jobs, but also be able to specify their needs section, which you can't do per matrix entry as far as I can tell (nor can you have matrix items depend on other matrix items).

The only possible way I could see this working is by having UET push a commit on top of the target commit to the target repository on some special branch name, whereby that commit adds a file called .github/workflows/uet-generated.yml, following by calling the "Create a workflow dispatch event" API endpoint. This is of course, extremely janky because we have to generate a new commit for every commit we want to build. I'm pretty sure that target commit needs to remove all other .github/workflows/ files to prevent recursive behaviour, and we need to delete the special branch after the downstream workflow completes regardless of success. This approach would also probably mean that the GitHub Actions UI will show the "generate" workflow and "generated" workflow as two separate entries - rather than them being connected in the UI like in GitLab.

hach-que avatar Nov 29 '24 14:11 hach-que

Thanks for looking into this! Sounds good; I don't think the janky experience is necessarily worth it due to the substantial amount of generated build commits.

mikeseese avatar Nov 29 '24 17:11 mikeseese

https://github.com/orgs/community/discussions/146008 is the product feedback I've raised with GitHub.

hach-que avatar Dec 02 '24 02:12 hach-que