Skip to content

Commit

Permalink
src: only resolve buildref on success
Browse files Browse the repository at this point in the history
  • Loading branch information
adityamaru committed Dec 1, 2024
1 parent 99d48d0 commit f0369ec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion dist/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -738,10 +738,6 @@ actionsToolkit.run(
await core.group('Cleaning up Blacksmith builder', async () => {
if (builderInfo.addr) {
try {
const buildxHistory = new BuildxHistory();
const exportRes = await buildxHistory.export({
refs: ref ? [ref] : []
});
await shutdownBuildkitd();
core.info('Shutdown buildkitd');
for (let attempt = 1; attempt <= 3; attempt++) {
Expand All @@ -759,6 +755,10 @@ actionsToolkit.run(
}
core.info('Unmounted device');
if (!buildError) {
const buildxHistory = new BuildxHistory();
const exportRes = await buildxHistory.export({
refs: ref ? [ref] : []
});
await reportBuildCompleted(exportRes, builderInfo.buildId, ref, buildDurationSeconds);
} else {
try {
Expand Down Expand Up @@ -862,4 +862,4 @@ function buildSummaryEnabled(): boolean {
return Util.parseBool(process.env.DOCKER_BUILD_SUMMARY);
}
return true;
}
}

0 comments on commit f0369ec

Please sign in to comment.