Skip to content

Merge ci-github-hosted.yml into ci.yml using new, optional inputs.run-self-hosted#261

Merged
CodeGat merged 2 commits intov3from
220-combine-self-and-github-hosted
Dec 10, 2025
Merged

Merge ci-github-hosted.yml into ci.yml using new, optional inputs.run-self-hosted#261
CodeGat merged 2 commits intov3from
220-combine-self-and-github-hosted

Conversation

@CodeGat
Copy link
Copy Markdown
Member

@CodeGat CodeGat commented Dec 9, 2025

Closes #220

Background

Currently, build-ci uses two workflow files, ci.yml and ci-github-hosted.yml for self- and GitHub-hosted runners respectively.

This is due to small, previously irreconcilable differences in the jobs.*.containers section - specifically regarding the volumes section. The GitHub-hosted variant didn't need any volumes to function, but the self-hosted one did.

After chatting with GitHub Support, it was noted that it is indeed possible to reconcile these differences, by using a inputs.run-self-hosted input that turns the volume list into the expected list of volume defs if true, and empty lists if false.

The PR

  • Add new, optional inputs.run-self-hosted that defaults to true
  • jobs.*.runs-on is determined by inputs.run-self-hosted - either the self-hosted group or the default ubuntu-latest
  • jobs.*.container.image is also determined by the new input - picking either the runner or upstream image
  • jobs.*.container.volumes is the same - either the two required volumes for self-hosted, or dummy volumes for GitHub-hosted

Testing

Tested in ACCESS-NRI/access-test-component#15. Note that the failures are due to concretization issues with the manifest - it is the initialisation of the containers that is the important part.

Specifically:

Other Implementations

In f2c8bd2, I used fromJson('[]') as the GitHub-hosted case, but that was a bit flaky, as it was doing:

- ${{ fromJson('[]') }}
- "[]"

Which meant under the hood docker --volume was silently ignoring the invalid volume definition (usually of the form HOST_PATH:CONTAINER_PATH:FLAGS). This works okay, but is flaky - docker or GitHub may throw errors for that in future.

@CodeGat CodeGat added priority:high A high priority issue - has an impact on core functionality type:enhancement improvements to code but not new features for:v3 version:MAJOR Requires a change to the major version - breaking changes! labels Dec 9, 2025
@CodeGat CodeGat self-assigned this Dec 9, 2025
@CodeGat CodeGat added version:MINOR Requires a change to the minor version - features and removed version:MAJOR Requires a change to the major version - breaking changes! labels Dec 9, 2025
Copy link
Copy Markdown
Member

@aidanheerdegen aidanheerdegen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work!

@CodeGat CodeGat merged commit 96e54d9 into v3 Dec 10, 2025
@CodeGat CodeGat deleted the 220-combine-self-and-github-hosted branch December 10, 2025 02:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

for:v3 priority:high A high priority issue - has an impact on core functionality type:enhancement improvements to code but not new features version:MINOR Requires a change to the minor version - features

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Merge ci.yml and ci-github-hosted.yml Once Solution to Volumes Found

2 participants