forking from discussion at https://github.com/ROCm/TheRock/pull/4366/changes#r3242863090
As for why this is set up this way, we should add some docs/diagrams explaining the architecture... It's roughly:
- The entry point https://github.com/ROCm/rockrel/blob/main/.github/workflows/multi_arch_release.yml workflow runs in rockrel with
uses: ROCm/TheRock/.github/workflows/multi_arch_release.yml@main. That uses the code from TheRock (currently with a floating pin to main but we could pin to a specific ref)
- When that code runs
uses: benc-uk/workflow-dispatch, the triggered workflow should also run in rockrel (https://github.com/ROCm/rockrel/actions), not in therock (https://github.com/ROCm/TheRock/actions). The default repo behavior of that action (https://github.com/benc-uk/workflow-dispatch#repo) is what we want - if we wanted to trigger in another repo then we'd need to specify it and provide a token.
- For that triggered workflow to run, it needs a file in https://github.com/ROCm/rockrel/tree/main/.github/workflows. We use stub workflows like https://github.com/ROCm/rockrel/blob/main/.github/workflows/test_artifacts.yml that just forward their inputs through to e.g.
uses: ROCm/TheRock/.github/workflows/test_artifacts.yml@main
- We pass
repository and ref to each workflow so rockrel can clarify that it wants the actions to checkout ROCm/TheRock and some specific ref (branch/tag/etc.) of TheRock, not the repository/ref of the entry point workflow (ROCm/rockrel + some commit there), see
|
repository: "ROCm/TheRock" |
Alternate designs are possible, and we can add unit tests and ref pinning across workflows to make such changes easier/safer.
See also:
Ideas for how to improve:
forking from discussion at https://github.com/ROCm/TheRock/pull/4366/changes#r3242863090
See also:
Trigger Native Install Testjobs fail —test_native_linux_packages_install.ymlworkflow missing in ROCm/rockrel TheRock#5647Ideas for how to improve: