Skip to content

Commit

Permalink
fix: build output param
Browse files Browse the repository at this point in the history
  • Loading branch information
fangzhengjin committed Sep 20, 2023
1 parent a5777f6 commit b94fa03
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/scripts/run-build.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,18 @@ module.exports = async (scripts) => {
'org.opencontainers.image.base.name': baseImage,
});

const platformArgs = runtime.readBuildPlatform(package);
const labelArgs = Object.keys(annotations).map((key) => `--label=${key}=${annotations[key]}`);
const annotationArgs = Object.keys(annotations).map((key) => `annotation-index.${key}=${annotations[key]}`);

await exec.exec('docker', [
'buildx',
'build',
'--provenance=false',
`--platform=${runtime.readBuildPlatform(package).join(',')}`,
`--platform=${platformArgs.join(',')}`,
...tags,
...labelArgs,
`--output=type=image,${annotationArgs.join(',')}`,
platformArgs.length > 1 ? `--output=type=image,${platformArgs.join(',')}` : '',
context.payload.label.name,
'--push',
]);
Expand Down

0 comments on commit b94fa03

Please sign in to comment.