Skip to content

Commit 00f0c17

Browse files
committed
DOCKER_BUILD_NO_SUMMARY env to disable summary
Signed-off-by: CrazyMax <[email protected]>
1 parent a29d7e9 commit 00f0c17

File tree

3 files changed

+35
-0
lines changed

3 files changed

+35
-0
lines changed

.github/workflows/ci.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -522,3 +522,27 @@ jobs:
522522
name: Check docker
523523
run: |
524524
docker image inspect localhost:5000/name/app:latest
525+
526+
disable-summary:
527+
runs-on: ubuntu-latest
528+
steps:
529+
-
530+
name: Checkout
531+
uses: actions/checkout@v4
532+
-
533+
name: Set up Docker Buildx
534+
uses: docker/setup-buildx-action@v3
535+
with:
536+
version: ${{ inputs.buildx-version || env.BUILDX_VERSION }}
537+
driver-opts: |
538+
image=${{ inputs.buildkit-image || env.BUILDKIT_IMAGE }}
539+
network=host
540+
-
541+
name: Build
542+
uses: ./
543+
with:
544+
files: |
545+
./test/config.hcl
546+
targets: app
547+
env:
548+
DOCKER_BUILD_NO_SUMMARY: true

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ___
1919
* [Customizing](#customizing)
2020
* [inputs](#inputs)
2121
* [outputs](#outputs)
22+
* [environment variables](#environment-variables)
2223
* [Subactions](#subactions)
2324
* [`list-targets`](#list-targets)
2425
* [Contributing](#contributing)
@@ -255,6 +256,12 @@ The following outputs are available
255256
|------------|----------|----------------------------|
256257
| `targets` | List/CSV | List of extracted targest |
257258

259+
### environment variables
260+
261+
| Name | Type | Description |
262+
|---------------------------|------|-------------------------------------------------------------------------------------------------------------------|
263+
| `DOCKER_BUILD_NO_SUMMARY` | Bool | If `true`, [build summary](https://docs.docker.com/build/ci/github-actions/build-summary/) generation is disabled |
264+
258265
## Contributing
259266

260267
Want to contribute? Awesome! You can find information about contributing to

src/main.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,10 @@ actionsToolkit.run(
166166
async () => {
167167
if (stateHelper.buildRefs.length > 0) {
168168
await core.group(`Generating build summary`, async () => {
169+
if (process.env.DOCKER_BUILD_NO_SUMMARY && Util.parseBool(process.env.DOCKER_BUILD_NO_SUMMARY)) {
170+
core.info('Summary disabled');
171+
return;
172+
}
169173
try {
170174
const buildxHistory = new BuildxHistory();
171175
const exportRes = await buildxHistory.export({

0 commit comments

Comments
 (0)