Skip to content

Commit aabbd3f

Browse files
authored
Merge pull request #1170 from crazy-max/rename-summary-disable
rename DOCKER_BUILD_NO_SUMMARY to DOCKER_BUILD_SUMMARY_DISABLE
2 parents 709dde2 + 9c7c277 commit aabbd3f

File tree

5 files changed

+15
-5
lines changed

5 files changed

+15
-5
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1366,7 +1366,7 @@ jobs:
13661366
with:
13671367
file: ./test/Dockerfile
13681368
env:
1369-
DOCKER_BUILD_NO_SUMMARY: true
1369+
DOCKER_BUILD_SUMMARY_DISABLE: true
13701370

13711371
summary-not-supported:
13721372
runs-on: ubuntu-latest

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ The following outputs are available:
258258

259259
| Name | Type | Description |
260260
|--------------------------------------|--------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
261-
| `DOCKER_BUILD_NO_SUMMARY` | Bool | If `true`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
261+
| `DOCKER_BUILD_SUMMARY_DISABLE` | Bool | If `true`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
262262
| `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` |
263263

264264
## Troubleshooting

dist/index.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ actionsToolkit.run(
138138
});
139139

140140
await core.group(`Check build summary support`, async () => {
141-
if (process.env.DOCKER_BUILD_NO_SUMMARY && Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY)) {
141+
if (buildSummaryDisabled()) {
142142
core.info('Build summary disabled');
143143
} else if (GitHub.isGHES) {
144144
core.warning('Build summary is not yet supported on GHES');
@@ -211,6 +211,16 @@ async function buildRef(toolkit: Toolkit, since: Date, builder?: string): Promis
211211
return Object.keys(refs).length > 0 ? Object.keys(refs)[0] : '';
212212
}
213213

214+
function buildSummaryDisabled(): boolean {
215+
if (process.env.DOCKER_BUILD_NO_SUMMARY) {
216+
core.warning('DOCKER_BUILD_NO_SUMMARY is deprecated. Use DOCKER_BUILD_SUMMARY_DISABLE instead.');
217+
return Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY);
218+
} else if (process.env.DOCKER_BUILD_SUMMARY_DISABLE) {
219+
return Util.parseBool(process.env.DOCKER_BUILD_SUMMARY_DISABLE);
220+
}
221+
return false;
222+
}
223+
214224
function buildExportRetentionDays(): number | undefined {
215225
if (process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS) {
216226
const res = parseInt(process.env.DOCKER_BUILD_EXPORT_RETENTION_DAYS);

0 commit comments

Comments
 (0)