-
Notifications
You must be signed in to change notification settings - Fork 7.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: github actions check annotations
Signed-off-by: David Karlsson <[email protected]>
- Loading branch information
Showing
2 changed files
with
26 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
Check failure on line 37 in content/build/checks.md GitHub Actions / vale
|
||
- [docker/bake-action](https://github.com/docker/bake-action) version 5.6.0 and later | ||
Check failure on line 38 in content/build/checks.md GitHub Actions / vale
|
||
|
||
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 pull requests. | ||
|
||
```yaml | ||
name: Build and push Docker images | ||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Build and push | ||
uses: docker/[email protected] | ||
``` | ||
![GitHub Actions build check annotations](./images/gha-check-annotations.png) | ||
### More verbose output | ||
Check warnings for a regular `docker build` display a concise message | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.