Skip to content

Commit

Permalink
allow filesystem entitlements by default
Browse files Browse the repository at this point in the history
Signed-off-by: CrazyMax <[email protected]>
  • Loading branch information
crazy-max committed Nov 22, 2024
1 parent 9bc07af commit a5959dc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
9 changes: 8 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -694,6 +694,13 @@ jobs:

allow:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
buildx-version:
- v0.19.0-rc1
- v0.18.0
- v0.17.1
steps:
-
name: Checkout
Expand All @@ -702,7 +709,7 @@ jobs:
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
version: ${{ matrix.buildx-version }}
driver-opts: |
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
-
Expand Down
8 changes: 6 additions & 2 deletions src/context.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit a5959dc

Please sign in to comment.