Add configuration to disable storage-overlay config

By disabling this feature buildah defaults to the normal configuration,
which in case of running on kernel >5.13 would default to the native
overlay.

The native overlay is way quicker than fuse-overlayfs and drastically
improves build speed.
This commit is contained in:
Björn Häuser 2022-09-19 15:51:33 +02:00 committed by Philipp Trulson
parent b4dc19b4ba
commit 0a7492d635
No known key found for this signature in database
GPG key ID: 86BE2D4ACF8F1074
5 changed files with 24 additions and 11 deletions

View file

@ -9,11 +9,11 @@ inputs:
description: 'The name (reference) of the image to build'
required: false
tags:
description: 'The tags of the image to build. For multiple tags, seperate by whitespace. For example, "latest v1".'
description: 'The tags of the image to build. For multiple tags, separate by whitespace. For example, "latest v1".'
required: false
default: latest
labels:
description: 'The labels of the image to build. Seperate by newline. For example, "io.containers.capabilities=sys_admin,mknod".'
description: 'The labels of the image to build. Separate by newline. For example, "io.containers.capabilities=sys_admin,mknod".'
required: false
base-image:
description: 'The base image to use to create a new container image'
@ -60,7 +60,7 @@ inputs:
archs:
description: |
'Same as input 'arch', use this for multiple architectures.
Seperate them by a comma'
Separate them by a comma'
required: false
platform:
description: |
@ -70,7 +70,7 @@ inputs:
platforms:
description: |
'Same as input 'platform', use this for multiple platforms.
Seperate them by a comma'
Separate them by a comma'
required: false
extra-args:
description: |
@ -82,6 +82,11 @@ inputs:
Require HTTPS and verify certificates when accessing the registry. Defaults to true.
required: false
default: 'true'
storage-overlay:
description: |
Configure storage-overlay auto-detection
required: false
default: 'true'
outputs:
image:
description: 'Name of the image built'

2
dist/index.js vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

View file

@ -8,7 +8,7 @@ export enum Inputs {
ARCH = "arch",
/**
* 'Same as input 'arch', use this for multiple architectures.
* Seperate them by a comma'
* Separate them by a comma'
* Required: false
* Default: None.
*/
@ -75,7 +75,7 @@ export enum Inputs {
*/
IMAGE = "image",
/**
* The labels of the image to build. Seperate by newline. For example, "io.containers.capabilities=sys_admin,mknod".
* The labels of the image to build. Separate by newline. For example, "io.containers.capabilities=sys_admin,mknod".
* Required: false
* Default: None.
*/
@ -101,7 +101,7 @@ export enum Inputs {
PLATFORM = "platform",
/**
* 'Same as input 'platform', use this for multiple platforms.
* Seperate them by a comma'
* Separate them by a comma'
* Required: false
* Default: None.
*/
@ -113,7 +113,13 @@ export enum Inputs {
*/
PORT = "port",
/**
* The tags of the image to build. For multiple tags, seperate by whitespace. For example, "latest v1".
* Configure storage-overlay auto-detection
* Required: false
* Default: "true"
*/
STORAGE_OVERLAY = "storage-overlay",
/**
* The tags of the image to build. For multiple tags, separate by whitespace. For example, "latest v1".
* Required: false
* Default: "latest"
*/

View file

@ -26,7 +26,9 @@ export async function run(): Promise<void> {
await cli.execute([ "version" ], { group: true });
// Check if fuse-overlayfs exists and find the storage driver
await cli.setStorageOptsEnv();
if (core.getInput(Inputs.STORAGE_OVERLAY)) {
await cli.setStorageOptsEnv();
}
const DEFAULT_TAG = "latest";
const workspace = process.env.GITHUB_WORKSPACE || process.cwd();