build(docker): adjust platform detection

This commit is contained in:
Travis Shivers 2020-10-02 21:03:25 -05:00
parent e1eeaf19c1
commit 5d3cf873d6
No known key found for this signature in database
GPG Key ID: EE4CC2891B8FCD33
1 changed files with 3 additions and 1 deletions

View File

@ -28,7 +28,9 @@ const getDockerfileArches = (file, supportedPlatformsStr) => {
const basePlatforms = getImagePlatforms(getDockerfileImage(file));
console.log('Base platforms: ', basePlatforms.join(', '));
const supportedPlatforms = supportedPlatformsStr.split(',');
return basePlatforms.filter((platform) => supportedPlatforms.includes(platform)).join(',');;
return basePlatforms.filter(
(platform) => supportedPlatforms.some((supPlatform) => platform.startsWith(supPlatform)),
).join(',');
}
module.exports = getDockerfileArches;