You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-46Lines changed: 50 additions & 46 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,8 +14,8 @@ as a high-level build command.
14
14
___
15
15
16
16
*[Usage](#usage)
17
-
*[Path context](#path-context)
18
17
*[Git context](#git-context)
18
+
*[Path context](#path-context)
19
19
*[Summaries](#summaries)
20
20
*[Customizing](#customizing)
21
21
*[inputs](#inputs)
@@ -27,57 +27,22 @@ ___
27
27
28
28
## Usage
29
29
30
-
### Path context
31
-
32
-
By default, this action will use the local bake definition (`source: .`), so
33
-
you need to use the [`actions/checkout`](https://github.com/actions/checkout/)
34
-
action to check out the repository.
35
-
36
-
```yaml
37
-
name: ci
38
-
39
-
on:
40
-
push:
41
-
branches:
42
-
- 'master'
43
-
44
-
jobs:
45
-
bake:
46
-
runs-on: ubuntu-latest
47
-
steps:
48
-
-
49
-
name: Checkout
50
-
uses: actions/checkout@v4
51
-
-
52
-
name: Login to DockerHub
53
-
uses: docker/login-action@v3
54
-
with:
55
-
username: ${{ vars.DOCKERHUB_USERNAME }}
56
-
password: ${{ secrets.DOCKERHUB_TOKEN }}
57
-
-
58
-
name: Set up Docker Buildx
59
-
uses: docker/setup-buildx-action@v3
60
-
-
61
-
name: Build and push
62
-
uses: docker/bake-action@v5
63
-
with:
64
-
push: true
65
-
```
66
-
67
30
### Git context
68
31
69
-
Git context can be provided using the [`source` input](#inputs). This means
70
-
that you don't need to use the [`actions/checkout`](https://github.com/actions/checkout/)
32
+
Since `v6` this action uses the [Git context](https://docs.docker.com/build/bake/remote-definition/)
33
+
to build from a remote bake definition by default like the [build-push-action](https://github.com/docker/build-push-action)
34
+
does. This means that you don't need to use the [`actions/checkout`](https://github.com/actions/checkout/)
71
35
action to check out the repository as [BuildKit](https://docs.docker.com/build/buildkit/)
72
36
will do this directly.
73
37
38
+
The git reference will be based on the [event that triggered your workflow](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows)
39
+
and will result in the following context: `https://github.com/<owner>/<repo>.git#<ref>`.
0 commit comments