mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-19 08:16:37 +00:00
Merge pull request #47 from useblacksmith/resize
src: add resize2fs call if the block device is formatted
This commit is contained in:
commit
eb6486e7e1
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}`);
|
const {stdout} = await execAsync(`sudo blkid -o value -s TYPE ${device}`);
|
||||||
if (stdout.trim() === 'ext4') {
|
if (stdout.trim() === 'ext4') {
|
||||||
core.debug(`Device ${device} is already formatted with 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;
|
return device;
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user