mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-06 13:39:30 +02:00
src: add resize2fs call if the block device is formatted
This commit is contained in:
parent
d197edcd29
commit
f16c36e819
3 changed files with 5 additions and 2 deletions
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
|
@ -332,6 +332,9 @@ async function maybeFormatBlockDevice(device: string): Promise<string> {
|
|||
const {stdout} = await execAsync(`sudo blkid -o value -s TYPE ${device}`);
|
||||
if (stdout.trim() === 'ext4') {
|
||||
core.debug(`Device ${device} is already formatted with ext4`);
|
||||
// Run resize2fs to ensure filesystem uses full block device
|
||||
await execAsync(`sudo resize2fs ${device}`);
|
||||
core.debug(`Resized ext4 filesystem on ${device}`);
|
||||
return device;
|
||||
}
|
||||
} catch (error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue