File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff 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 ( {
Original file line number Diff line number Diff line change 11import * as core from '@actions/core' ;
22
3+ import { BuilderInfo } from '@docker/actions-toolkit/lib/types/buildx/builder' ;
4+
35import { Inputs , sanitizeInputs } from './context' ;
46
57export const tmpDir = process . env [ 'STATE_tmpDir' ] || '' ;
68export 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 ;
710export const buildRef = process . env [ 'STATE_buildRef' ] || '' ;
811
912export 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+
1724export function setBuildRef ( buildRef : string ) {
1825 core . saveState ( 'buildRef' , buildRef ) ;
1926}
You can’t perform that action at this time.
0 commit comments