Skip to content

feat: add platform option to BootcImageBuilder for architecture specification#62

Draft
hanthor wants to merge 2 commits into
osbuild:mainfrom
hanthor:platform-flag
Draft

feat: add platform option to BootcImageBuilder for architecture specification#62
hanthor wants to merge 2 commits into
osbuild:mainfrom
hanthor:platform-flag

Conversation

@hanthor
Copy link
Copy Markdown

@hanthor hanthor commented Jul 23, 2025

fixes #61

Please test, idk how best to test at this point

@hanthor hanthor requested a review from p5 as a code owner July 23, 2025 11:53
Comment thread README.md Outdated

Specify the archatecture of the image to pull

Default: `linux/amd64`
Copy link
Copy Markdown
Contributor

@p5 p5 Jul 23, 2025

Choose a reason for hiding this comment

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

Rather than defaulting to linux/amd64, please can we make this an optional input (i.e. not specified in any podman/bib commands by default) so it defaults to BIB's implementation?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yeah I think copilot called me out and fixed that.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

whoops I just committed it

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I couldn't track why there are 2 copies of the same image pull code

@hanthor
Copy link
Copy Markdown
Author

hanthor commented Jul 23, 2025

OOh nice actions!

@hanthor hanthor marked this pull request as draft July 23, 2025 11:59
@hanthor
Copy link
Copy Markdown
Author

hanthor commented Jul 23, 2025

I'm converting to a draft until I can verify that I can make a linux/amd64/v2 image with BIB

@p5
Copy link
Copy Markdown
Contributor

p5 commented Jul 23, 2025

I'm converting to a draft until I can verify that I can make a linux/amd64/v2 image with BIB

To verify the changes in this PR work as you expect, you can change your workflows to point from:

uses: osbuild/bootc-image-builder-action@<whatever>

to:

uses: hanthor/bootc-image-builder-action@platform-flag

Comment thread src/main.ts
const configFilePath: string = core.getInput('config-file')
const image: string = core.getInput('image')
const builderImage: string = core.getInput('builder-image')
const platform: string = core.getInput('platform') || 'linux/amd64'
Copy link
Copy Markdown
Contributor

@p5 p5 Jul 23, 2025

Choose a reason for hiding this comment

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

Would be best if this defaults to null or an empty string if the input is not found, rather than always linux/amd64.
Then elsewhere in the code, include conditions like (pseudocode):

if platform != null {
  podmanArgs.push("--platform ${platform}")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Platform support

2 participants