rename DOCKER_BUILD_NO_SUMMARY to DOCKER_BUILD_SUMMARY_DISABLE
Signed-off-by: CrazyMax <1951866+crazy-max@users.noreply.github.com>pull/1170/head
parent
709dde20a7
commit
987902144c
|
@ -1366,7 +1366,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
file: ./test/Dockerfile
|
file: ./test/Dockerfile
|
||||||
env:
|
env:
|
||||||
DOCKER_BUILD_NO_SUMMARY: true
|
DOCKER_BUILD_SUMMARY_DISABLE: true
|
||||||
|
|
||||||
summary-not-supported:
|
summary-not-supported:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
|
@ -258,7 +258,7 @@ The following outputs are available:
|
||||||
|
|
||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
|--------------------------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
|--------------------------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
||||||
| `DOCKER_BUILD_NO_SUMMARY` | Bool | If `true`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
|
| `DOCKER_BUILD_SUMMARY_DISABLE` | Bool | If `true`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
|
||||||
| `DOCKER_BUILD_EXPORT_RETENTION_DAYS` | Number | Duration after which build export artifact will expire in days. Defaults to repository/org [retention settings](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy) if unset or `0` |
|
| `DOCKER_BUILD_EXPORT_RETENTION_DAYS` | Number | Duration after which build export artifact will expire in days. Defaults to repository/org [retention settings](https://docs.github.com/en/actions/learn-github-actions/usage-limits-billing-and-administration#artifact-and-log-retention-policy) if unset or `0` |
|
||||||
|
|
||||||
## Troubleshooting
|
## Troubleshooting
|
||||||
|
|
12
src/main.ts
12
src/main.ts
|
@ -138,7 +138,7 @@ actionsToolkit.run(
|
||||||
});
|
});
|
||||||
|
|
||||||
await core.group(`Check build summary support`, async () => {
|
await core.group(`Check build summary support`, async () => {
|
||||||
if (process.env.DOCKER_BUILD_NO_SUMMARY && Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY)) {
|
if (buildSummaryDisabled()) {
|
||||||
core.info('Build summary disabled');
|
core.info('Build summary disabled');
|
||||||
} else if (GitHub.isGHES) {
|
} else if (GitHub.isGHES) {
|
||||||
core.warning('Build summary is not yet supported on GHES');
|
core.warning('Build summary is not yet supported on GHES');
|
||||||
|
@ -211,6 +211,16 @@ async function buildRef(toolkit: Toolkit, since: Date, builder?: string): Promis
|
||||||
return Object.keys(refs).length > 0 ? Object.keys(refs)[0] : '';
|
return Object.keys(refs).length > 0 ? Object.keys(refs)[0] : '';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function buildSummaryDisabled(): boolean {
|
||||||
|
if (process.env.DOCKER_BUILD_NO_SUMMARY) {
|
||||||
|
core.warning('DOCKER_BUILD_NO_SUMMARY is deprecated. Use DOCKER_BUILD_SUMMARY_DISABLE instead.');
|
||||||
|
return Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY);
|
||||||
|
} else if (process.env.DOCKER_BUILD_SUMMARY_DISABLE) {
|
||||||
|
return Util.parseBool(process.env.DOCKER_BUILD_SUMMARY_DISABLE);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
function buildExportRetentionDays(): number | undefined {
|
function buildExportRetentionDays(): number | undefined {
|
||||||
if (process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS) {
|
if (process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS) {
|
||||||
const res = parseInt(process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS);
|
const res = parseInt(process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS);
|
||||||
|
|
Loading…
Reference in New Issue