allow filesystem entitlements by default

Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax
2024-11-22 08:24:48 +01:00
parent 9bc07af8a8
commit 3883a2154a
2 changed files with 14 additions and 3 deletions

View File

@@ -83,9 +83,13 @@ async function getBakeArgs(inputs: Inputs, definition: BakeDefinition, toolkit:
args.push(inputs.source);
}
if (await toolkit.buildx.versionSatisfies('>=0.17.0')) {
if (inputs.allow.length > 0) {
args.push('--allow', inputs.allow.join(','));
if (await toolkit.buildx.versionSatisfies('>=0.18.0')) {
// allow filesystem entitlements by default
inputs.allow.push('fs=*');
}
await Util.asyncForEach(inputs.allow, async allow => {
args.push('--allow', allow);
});
}
await Util.asyncForEach(inputs.files, async file => {
args.push('--file', file);