Replies: 1 comment 6 replies
-
Apparently, we can trigger a workflow based on issue comments/pr comments: https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#issue_comment The event object exposes the
from users that are added as collaborators to the repo or that are part of the org. |
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Situation
Recently, work completed on automated Pull Request builds and tests via Github Actions for the "root" Scripts repository. The feature allows for automated and for manually triggered OS image builds + qemu test runs.
Manual builds can be triggered by dispatching the
ci.yaml
workflow, e.g. specifying a custom branch. Tests will be run automatically after the build was successful. Additionally, tests can be triggered separately and will then run on the artifacts of a previous build.PRs will automatically be built on
Cycling a PR back to "Draft" and immediately back to "Ready for review" can be used to re-build / re-test PRs after changes were made. Similarly, re-requesting review after a reviewer left comments but did not approve can also be used to re-build and re-test.
Problem
While the above feature exist for the scripts repo, PRs in the sub-modules coreos-overlay and portage-stable are not covered. Currently, to make use of builds+tests, one would need to
a. push fix to the submodule PR branch
b. update submodule ref and push to the scripts PR branch
c. re-trigger build, goto 3.
Proposed solution
The path forward proposed here is to automate as much as possible of the manual workflow laid out above, and to run builds and tests directly on the submodule branch via Github reusable workflows (i.e. make
ci-yaml
reusable). User-visible / interactive workflow would be:Out of scope
PRs that require changes in both submodule repos are currently out of scope (though discussion of options in this thread is strongly encouraged!).
Automation / Implementation options
When a build/test is triggered in a submodule repo PR (i.e. step 2. above)
a. Target branch of the scripts PR is the same as for the submodule PR. If that branch does not exist in scripts then automation terminates.
b. The scripts tracking PR is prefixed with
[<SUBMODULE REPO NAME>]
and the PR's summary line is copied verbatim from the submodule repo PRc. The scripts tracking branch is prefixed with
<submodule repo name>/
. It consists of a single commit which only includes one change: update the submodule ref. The ref is amended and force-pushed every time the submodule PR re-triggers a build+test.When a submodule PR was merged
When a submodule PR is closed w/o merge
Challenges / pitfalls
a. bypass automated builds / tests entirely and be merged straight away
b. cherry-pick script could be updated to create PRs instead of commits, causing the automation to jump into gear (though this could easily overwhelm our self-hosted runners)
Side effects
main
branch or to maintenance branches will now propagate to the respective branch inscripts
immediately on merge instead of once a night via the nightly builds.Alternatives
An alternative to the above automated cross-PRs is currently undergoing RFC here: flatcar/scripts#699 . This would merge both submodules right into scripts, making scripts the one and only repo for Flatcar builds. It would simplify automation significantly but would mean a noticeable up-front investment of effort (and also has a risk of causing build breakage as a side effect).
Beta Was this translation helpful? Give feedback.
All reactions