src: only resolve buildref on success

This commit is contained in:
Aditya Maru 2024-12-01 12:51:40 -05:00
parent 99d48d070c
commit 9841eabab1
3 changed files with 10 additions and 7 deletions

2
dist/index.js generated vendored

File diff suppressed because one or more lines are too long

2
dist/index.js.map generated vendored

File diff suppressed because one or more lines are too long

View File

@ -738,10 +738,13 @@ 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] : []
});
let exportRes;
if (!buildError) {
const buildxHistory = new BuildxHistory();
exportRes = await buildxHistory.export({
refs: ref ? [ref] : []
});
}
await shutdownBuildkitd();
core.info('Shutdown buildkitd');
for (let attempt = 1; attempt <= 3; attempt++) {