mirror of
https://github.com/docker/build-push-action.git
synced 2025-05-07 14:09:30 +02:00
Merge pull request #17 from useblacksmith/add-some-logifc
add retry to umount logic incase proc is still running
This commit is contained in:
commit
48d4153fc0
3 changed files with 15 additions and 4 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
15
src/main.ts
15
src/main.ts
|
@ -587,8 +587,19 @@ actionsToolkit.run(
|
||||||
if (stateHelper.remoteDockerBuildStatus != '') {
|
if (stateHelper.remoteDockerBuildStatus != '') {
|
||||||
try {
|
try {
|
||||||
await shutdownBuildkitd();
|
await shutdownBuildkitd();
|
||||||
await execAsync(`sudo umount ${mountPoint}`);
|
for (let attempt = 1; attempt <= 3; attempt++) {
|
||||||
core.debug(`${device} has been unmounted`);
|
try {
|
||||||
|
await execAsync(`sudo umount ${mountPoint}`);
|
||||||
|
core.debug(`${device} has been unmounted`);
|
||||||
|
break;
|
||||||
|
} catch (error) {
|
||||||
|
if (attempt === 3) {
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
core.warning(`Unmount failed, retrying (${attempt}/3)...`);
|
||||||
|
await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
|
}
|
||||||
|
}
|
||||||
if (stateHelper.remoteDockerBuildStatus == 'success') {
|
if (stateHelper.remoteDockerBuildStatus == 'success') {
|
||||||
await reportBuildCompleted();
|
await reportBuildCompleted();
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue