diff --git a/content/build/checks.md b/content/build/checks.md index d121efc38f3f..d40d78cc06c5 100644 --- a/content/build/checks.md +++ b/content/build/checks.md @@ -31,9 +31,15 @@ Build checks are useful for: ## Build with checks -Build checks are supported in Buildx version 0.15.0 and later. Invoking a build -runs the checks by default, and displays any violations in the build output. -For example, the following command both builds the image and runs the checks: +Build checks are supported in: + +- Buildx version 0.15.0 and later +- [docker/build-push-action](https://github.com/docker/build-push-action) version 6.6.0 and later +- [docker/bake-action](https://github.com/docker/bake-action) version 5.6.0 and later + +Invoking a build runs the checks by default, and displays any violations in the +build output. For example, the following command both builds the image and runs +the checks: ```console $ docker build . @@ -49,6 +55,23 @@ In this example, the build ran successfully, but a [JSONArgsRecommended](/reference/build-checks/json-args-recommended/) warning was reported, because `CMD` instructions should use JSON array syntax. +With the GitHub Actions, the checks display in the diff view of the pull request. + +```yaml +name: Build and push Docker images +on: + push: + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Build and push + uses: docker/build-push-action@v6.6.0 +``` + +![GitHub Actions build check annotations](./images/gha-check-annotations.png) + ### More verbose output Check warnings for a regular `docker build` display a concise message diff --git a/content/build/images/gha-check-annotations.png b/content/build/images/gha-check-annotations.png new file mode 100644 index 000000000000..7712ba042939 Binary files /dev/null and b/content/build/images/gha-check-annotations.png differ