-
Notifications
You must be signed in to change notification settings - Fork 561
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 #1120 from crazy-max/build-summary
export build record and generate summary
- Loading branch information
Showing
8 changed files
with
142 additions
and
5 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.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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,26 @@ | ||
import * as core from '@actions/core'; | ||
|
||
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 buildRef = process.env['STATE_buildRef'] || ''; | ||
|
||
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 setBuildRef(buildRef: string) { | ||
core.saveState('buildRef', buildRef); | ||
} |