feat: Add custom image endpoints for GitHub-hosted runners#4101
feat: Add custom image endpoints for GitHub-hosted runners#4101gmlewis merged 5 commits intogoogle:masterfrom
Conversation
Add three new data sources for managing custom images on GitHub-hosted runners: - github_actions_hosted_runner_custom_images: List all custom images for an org - github_actions_hosted_runner_custom_image: Get a single custom image definition - github_actions_hosted_runner_custom_image_versions: List versions of a custom image WIP: Blocked on google/go-github#4101 merging. Currently uses raw HTTP calls via the v3client to avoid a go-github version bump. Once the go-github PR lands and is released, these can be migrated to typed SDK methods. Includes acceptance tests, provider registration, and website docs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #4101 +/- ##
==========================================
+ Coverage 93.68% 93.71% +0.03%
==========================================
Files 211 211
Lines 19510 19614 +104
==========================================
+ Hits 18278 18382 +104
Misses 1034 1034
Partials 198 198 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
@austenstone - this one needs a linter cleanup before proceeding. |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @austenstone!
Just a few tweaks, please, then awaiting a second LGTM+Approval from any other contributor to this repo before merging.
cc: @stevehipwell - @alexandear - @zyfy29 - @Not-Dhananjay-Mishra - @munlicode
|
LGTM |
gmlewis
left a comment
There was a problem hiding this comment.
Thank you, @austenstone, @Not-Dhananjay-Mishra, and @munlicode!
LGTM.
@Not-Dhananjay-Mishra - do you approve now?
Not-Dhananjay-Mishra
left a comment
There was a problem hiding this comment.
Few small suggestion, otherwise LGMT 🚀
stevehipwell
left a comment
There was a problem hiding this comment.
Same as @Not-Dhananjay-Mishra, the structs need aligning to the required API fields (remove pointer & omitempty where field is always returned).
Add 6 new endpoints for managing custom images on GitHub-hosted runners,
for both organization and enterprise levels:
- ListHostedRunnerCustomImages: GET .../hosted-runners/images/custom
- GetHostedRunnerCustomImage: GET .../hosted-runners/images/custom/{id}
- DeleteHostedRunnerCustomImage: DELETE .../hosted-runners/images/custom/{id}
- ListHostedRunnerCustomImageVersions: GET .../hosted-runners/images/custom/{id}/versions
- GetHostedRunnerCustomImageVersion: GET .../hosted-runners/images/custom/{id}/versions/{ver}
- DeleteHostedRunnerCustomImageVersion: DELETE .../hosted-runners/images/custom/{id}/versions/{ver}
New types: HostedRunnerCustomImage, HostedRunnerCustomImages,
HostedRunnerCustomImageVersion, HostedRunnerCustomImageVersions
Fixes #XXXX
…ustomImages not HostedRunnerCustomImageVersions
All fields in HostedRunnerCustomImage and HostedRunnerCustomImageVersion are marked as required in the API schema, so they should be non-pointer types without omitempty.
e8a20cb to
a547cae
Compare
|
Thank you, @austenstone! |
|
Thank you, @stevehipwell and @Not-Dhananjay-Mishra! |
Summary
Add 6 new endpoints for managing custom images on GitHub-hosted runners, for both organization and enterprise levels.
New Endpoints
Organization (
ActionsService)ListHostedRunnerCustomImages/orgs/{org}/actions/hosted-runners/images/customGetHostedRunnerCustomImage/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}DeleteHostedRunnerCustomImage/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}ListHostedRunnerCustomImageVersions/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versionsGetHostedRunnerCustomImageVersion/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}DeleteHostedRunnerCustomImageVersion/orgs/{org}/actions/hosted-runners/images/custom/{image_definition_id}/versions/{version}Enterprise (
EnterpriseService)Same 6 endpoints under
/enterprises/{enterprise}/...New Types
HostedRunnerCustomImage— custom image definition (id, platform, name, source, versions_count, total_versions_size, latest_version, state)HostedRunnerCustomImages— list wrapperHostedRunnerCustomImageVersion— image version (version, size_gb, state, created_on)HostedRunnerCustomImageVersions— list wrapperAPI Docs
https://docs.github.com/en/rest/actions/hosted-runners?apiVersion=2026-03-10