feat: Allow filtering by platform on workflow call#209
feat: Allow filtering by platform on workflow call#209juanjosevazquezgil wants to merge 21 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds the ability to filter which platforms (e.g., linux/amd64, linux/arm64) to build for when calling the build_images workflow. This allows callers to selectively build images for specific platforms rather than always building for all platforms defined in the configuration.
Changes:
- Added a new
platformsinput parameter to the GitHub workflow with wildcard (*) or comma-separated platform list support - Implemented platform filtering logic that intersects requested platforms with each flavor's configured platforms
- Added platforms property to the BuildImages class to store and access the platform filter
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| .github/workflows/build_images.yaml | Added new platforms input parameter with default "*" and passes it to the workflow execution |
| firestarter/workflows/build_images/build_images.py | Implemented platform filtering logic including platforms property, check_if_build_all_platforms method, and intersection-based filtering in compile_images_for_all_flavors |
| firestarter/tests/test_build_images_functionality.py | Added platforms field to test variables to support the new BuildImages constructor parameter |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Closes https://github.com/prefapp/features/issues/831
Examples (
platforms)Build for platform
linux/amd64:build_images.yaml: https://github.com/jvazquez-prefapp/build-and-dispatch/blob/7ea76880870a8e818b306ef300c942e8a6304bfe/.github/build_images.yaml#L7Build for all platforms using
*:build_images: https://github.com/jvazquez-prefapp/build-and-dispatch/blob/7ea76880870a8e818b306ef300c942e8a6304bfe/.github/build_images.yaml#L7Default (also builds for all platforms when no
platformsattribute is set):build_images: https://github.com/jvazquez-prefapp/build-and-dispatch/blob/7ea76880870a8e818b306ef300c942e8a6304bfe/.github/build_images.yaml#L7No flavors to build after filtering:
build_images: https://github.com/jvazquez-prefapp/build-and-dispatch/blob/4492fb2782cee60d59142e9b6cad7f31a0d55410/.github/build_images.yaml#L6Examples (
runs_on)Default (no value for
runs_on):runs_onwith value: