Skip to content

Commit dc24cf9

Browse files
committed
don't generate summary for cloud driver
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>
1 parent 667cb22 commit dc24cf9

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

src/main.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ actionsToolkit.run(
8383
await core.group(`Builder info`, async () => {
8484
const builder = await toolkit.builder.inspect(inputs.builder);
8585
core.info(JSON.stringify(builder, null, 2));
86+
stateHelper.setBuilder(builder);
8687
});
8788

8889
const args: string[] = await context.getArgs(inputs, toolkit);
@@ -145,6 +146,10 @@ actionsToolkit.run(
145146
core.info('Summary disabled');
146147
return;
147148
}
149+
if (stateHelper.builder && stateHelper.builder.driver === 'cloud') {
150+
core.info('Summary is not yet supported with Docker Build Cloud');
151+
return;
152+
}
148153
try {
149154
const buildxHistory = new BuildxHistory();
150155
const exportRes = await buildxHistory.export({

src/state-helper.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
import * as core from '@actions/core';
22

3+
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder';
4+
35
import {Inputs, sanitizeInputs} from './context';
46

57
export const tmpDir = process.env['STATE_tmpDir'] || '';
68
export const inputs = process.env['STATE_inputs'] ? JSON.parse(process.env['STATE_inputs']) : undefined;
9+
export const builder = process.env['STATE_builder'] ? <BuilderInfo>JSON.parse(process.env['STATE_builder']) : undefined;
710
export const buildRef = process.env['STATE_buildRef'] || '';
811

912
export function setTmpDir(tmpDir: string) {
@@ -14,6 +17,10 @@ export function setInputs(inputs: Inputs) {
1417
core.saveState('inputs', JSON.stringify(sanitizeInputs(inputs)));
1518
}
1619

20+
export function setBuilder(builder: BuilderInfo) {
21+
core.saveState('builder', JSON.stringify(builder));
22+
}
23+
1724
export function setBuildRef(buildRef: string) {
1825
core.saveState('buildRef', buildRef);
1926
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy