mirror of
https://github.com/docker/build-push-action.git
synced 2026-07-01 12:01:38 +00:00
Compare commits
5 Commits
118e1982f9
...
35f3630278
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35f3630278 | ||
|
|
b274a74e63 | ||
|
|
1a557b3d82 | ||
|
|
0af89ac169 | ||
|
|
8e3a402792 |
@ -256,12 +256,6 @@ The following outputs are available:
|
||||
| `digest` | String | Image digest |
|
||||
| `metadata` | JSON | Build result metadata |
|
||||
|
||||
### environment variables
|
||||
|
||||
| Name | Type | Description |
|
||||
|---------------------------|------|-------------------------------------------------|
|
||||
| `DOCKER_BUILD_NO_SUMMARY` | Bool | If `true`, build summary generation is disabled |
|
||||
|
||||
## Troubleshooting
|
||||
|
||||
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
|
||||
|
||||
4
dist/index.js
generated
vendored
4
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/licenses.txt
generated
vendored
2
dist/licenses.txt
generated
vendored
@ -2807,7 +2807,7 @@ minimatch
|
||||
ISC
|
||||
The ISC License
|
||||
|
||||
Copyright (c) 2011-2023 Isaac Z. Schlueter and Contributors
|
||||
Copyright (c) Isaac Z. Schlueter and Contributors
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
|
||||
@ -79,25 +79,6 @@ export async function getInputs(): Promise<Inputs> {
|
||||
};
|
||||
}
|
||||
|
||||
export function sanitizeInputs(inputs: Inputs) {
|
||||
const res = {};
|
||||
for (const key of Object.keys(inputs)) {
|
||||
if (key === 'github-token') {
|
||||
continue;
|
||||
}
|
||||
const value: string | string[] | boolean = inputs[key];
|
||||
if (typeof value === 'boolean' && value === false) {
|
||||
continue;
|
||||
} else if (Array.isArray(value) && value.length === 0) {
|
||||
continue;
|
||||
} else if (!value) {
|
||||
continue;
|
||||
}
|
||||
res[key] = value;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
export async function getArgs(inputs: Inputs, toolkit: Toolkit): Promise<Array<string>> {
|
||||
const context = handlebars.compile(inputs.context)({
|
||||
defaultContext: Context.gitContext()
|
||||
|
||||
@ -136,10 +136,6 @@ actionsToolkit.run(
|
||||
async () => {
|
||||
if (stateHelper.buildRef.length > 0) {
|
||||
await core.group(`Generating build summary`, async () => {
|
||||
if (process.env.DOCKER_BUILD_NO_SUMMARY && Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY)) {
|
||||
core.info('Summary disabled');
|
||||
return;
|
||||
}
|
||||
try {
|
||||
const buildxHistory = new BuildxHistory();
|
||||
const exportRes = await buildxHistory.export({
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import * as core from '@actions/core';
|
||||
|
||||
import {Inputs, sanitizeInputs} from './context';
|
||||
import {Inputs} from './context';
|
||||
|
||||
export const tmpDir = process.env['STATE_tmpDir'] || '';
|
||||
export const inputs = process.env['STATE_inputs'] ? JSON.parse(process.env['STATE_inputs']) : undefined;
|
||||
@ -11,7 +11,22 @@ export function setTmpDir(tmpDir: string) {
|
||||
}
|
||||
|
||||
export function setInputs(inputs: Inputs) {
|
||||
core.saveState('inputs', JSON.stringify(sanitizeInputs(inputs)));
|
||||
const newInputs = {};
|
||||
for (const key of Object.keys(inputs)) {
|
||||
if (key === 'github-token') {
|
||||
continue;
|
||||
}
|
||||
const value: string | string[] | boolean = inputs[key];
|
||||
if (typeof value === 'boolean' && value === false) {
|
||||
continue;
|
||||
} else if (Array.isArray(value) && value.length === 0) {
|
||||
continue;
|
||||
} else if (!value) {
|
||||
continue;
|
||||
}
|
||||
newInputs[key] = value;
|
||||
}
|
||||
core.saveState('inputs', JSON.stringify(newInputs));
|
||||
}
|
||||
|
||||
export function setBuildRef(buildRef: string) {
|
||||
|
||||
@ -1057,7 +1057,7 @@ __metadata:
|
||||
|
||||
"@docker/actions-toolkit@https://github.com/crazy-max/docker-actions-toolkit#summary-test":
|
||||
version: 0.0.0+unknown
|
||||
resolution: "@docker/actions-toolkit@https://github.com/crazy-max/docker-actions-toolkit.git#commit=bb135ac93a8bf3ff63207e56e2fdcd4c1f4fe8d2"
|
||||
resolution: "@docker/actions-toolkit@https://github.com/crazy-max/docker-actions-toolkit.git#commit=3bf4429db863cb5fc40af57778d3dc44b794d5a0"
|
||||
dependencies:
|
||||
"@actions/artifact": ^2.1.7
|
||||
"@actions/cache": ^3.2.4
|
||||
@ -1077,7 +1077,7 @@ __metadata:
|
||||
jwt-decode: ^4.0.0
|
||||
semver: ^7.6.2
|
||||
tmp: ^0.2.3
|
||||
checksum: 1bdcfebcb3d7d6a16942e8418e5b9ef93270eb686b3f00de831d0f26f6dc41f6aef4314c5321616789bcfd4adf2b5640092fffa17b07528aed18ce8a9ea4b54c
|
||||
checksum: d285217419e425f116ea85f6abf10e9cb2604f28f7760e8cf374f1b756c8529e7d098bcd224929a89b4c4b4b00c10a7f0591cfb9dc649bdb9dc9604a687e31e2
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user