-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #208 from crazy-max/build-summary
export build record and generate summary
- Loading branch information
Showing
7 changed files
with
164 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,32 @@ | ||
import * as core from '@actions/core'; | ||
|
||
import {BakeDefinition} from '@docker/actions-toolkit/lib/types/buildx/bake'; | ||
import {BuilderInfo} from '@docker/actions-toolkit/lib/types/buildx/builder'; | ||
|
||
import {Inputs, sanitizeInputs} from './context'; | ||
|
||
export const tmpDir = process.env['STATE_tmpDir'] || ''; | ||
export const inputs = process.env['STATE_inputs'] ? JSON.parse(process.env['STATE_inputs']) : undefined; | ||
export const builder = process.env['STATE_builder'] ? <BuilderInfo>JSON.parse(process.env['STATE_builder']) : undefined; | ||
export const bakeDefinition = process.env['STATE_bakeDefinition'] ? <BakeDefinition>JSON.parse(process.env['STATE_bakeDefinition']) : undefined; | ||
export const buildRefs = process.env['STATE_buildRefs'] ? process.env['STATE_buildRefs'].split(',') : []; | ||
|
||
export function setTmpDir(tmpDir: string) { | ||
core.saveState('tmpDir', tmpDir); | ||
} | ||
|
||
export function setInputs(inputs: Inputs) { | ||
core.saveState('inputs', JSON.stringify(sanitizeInputs(inputs))); | ||
} | ||
|
||
export function setBuilder(builder: BuilderInfo) { | ||
core.saveState('builder', JSON.stringify(builder)); | ||
} | ||
|
||
export function setBakeDefinition(bakeDefinition: BakeDefinition) { | ||
core.saveState('bakeDefinition', JSON.stringify(bakeDefinition)); | ||
} | ||
|
||
export function setBuildRefs(buildRefs: Array<string>) { | ||
core.saveState('buildRefs', buildRefs.join(',')); | ||
} |