mirror of https://github.com/docker/docs.git
Merge pull request #20554 from dvdksn/gha-check-annotations
build: github actions check annotations
This commit is contained in:
commit
bedf993eba
|
|
@ -31,9 +31,15 @@ Build checks are useful for:
|
||||||
|
|
||||||
## Build with checks
|
## Build with checks
|
||||||
|
|
||||||
Build checks are supported in Buildx version 0.15.0 and later. Invoking a build
|
Build checks are supported in:
|
||||||
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:
|
- 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
|
```console
|
||||||
$ docker build .
|
$ docker build .
|
||||||
|
|
@ -49,6 +55,23 @@ In this example, the build ran successfully, but a
|
||||||
[JSONArgsRecommended](/reference/build-checks/json-args-recommended/) warning
|
[JSONArgsRecommended](/reference/build-checks/json-args-recommended/) warning
|
||||||
was reported, because `CMD` instructions should use JSON array syntax.
|
was reported, because `CMD` instructions should use JSON array syntax.
|
||||||
|
|
||||||
|
With the GitHub Actions, the checks display in the diff view of pull requests.
|
||||||
|
|
||||||
|
```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
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
### More verbose output
|
### More verbose output
|
||||||
|
|
||||||
Check warnings for a regular `docker build` display a concise message
|
Check warnings for a regular `docker build` display a concise message
|
||||||
|
|
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 33 KiB |
Loading…
Reference in New Issue