Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/.build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
outputs:
includes: ${{ steps.matrix.outputs.includes }}
verifications: ${{ steps.matrix.outputs.verifications }}
go-version: ${{ steps.matrix.outputs.go-version }}
steps:
-
name: Checkout
Expand Down Expand Up @@ -87,6 +88,7 @@ jobs:
await core.group(`Generating matrix`, async () => {
const includes = [];
const verifications = [];
let goVersion;
for (const targetName of Object.keys(def.target)) {
if (!targetName.startsWith(`pkg-${inpName}-`)) {
continue;
Expand All @@ -102,6 +104,15 @@ jobs:
}
const target = def.target[targetName];
if (target.platforms && target.platforms.length > 0) {
const targetGoVersion = target.args.GO_VERSION;
if (!targetGoVersion) {
throw new Error(`GO_VERSION not found for ${targetName}`);
}
if (goVersion === undefined) {
goVersion = targetGoVersion;
} else if (goVersion !== targetGoVersion) {
throw new Error(`Inconsistent GO_VERSION values: ${goVersion} and ${targetGoVersion}`);
}
includes.push({
distro: distro
});
Expand All @@ -127,6 +138,7 @@ jobs:
core.info(JSON.stringify(verifications, null, 2));
core.setOutput('includes', JSON.stringify(includes));
core.setOutput('verifications', JSON.stringify(verifications));
core.setOutput('go-version', goVersion);
});

# TODO: add RH_USER and RH_PASS to the build job once we have a way to pass secrets: https://github.com/docker/github-builder/pull/248
Expand Down Expand Up @@ -208,6 +220,7 @@ jobs:
- build
- verify
env:
GO_VERSION: ${{ needs.prepare.outputs.go-version }}

@crazy-max crazy-max Aug 19, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hum actually would be better not name it GO_VERSION to avoid colliding with bake def var

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thinking again that seems fine for release target

INPUT_INCLUDES: ${{ needs.prepare.outputs.includes }}
INPUT_NAME: ${{ inputs.name }}
steps:
Expand Down Expand Up @@ -344,6 +357,7 @@ jobs:
* ref: \`${REF}\`
* version: \`${VERSION}\`
* commit: [\`${COMMIT}\`](${REPO}/commit/${COMMIT})
* go version: \`${GO_VERSION}\`
EOF

if [ "$INPUT_NAME" = "containerd" ]; then
Expand Down
Loading