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
GitHub Action to build and push Docker images with [Buildx](https://github.com/docker/buildx)
5
+
WarpBuild's fork of the `docker/build-push-action`to build and push Docker images with [Buildx](https://github.com/docker/buildx) and WarpBuild's [remote builders](https://docs.warpbuild.com/docker-builders)
10
6
with full support of the features provided by [Moby BuildKit](https://github.com/moby/buildkit)
11
7
builder toolkit. This includes multi-platform build, secrets, remote cache, etc.
12
8
and different builder deployment/namespacing options.
In the examples below we are also using 3 other actions:
28
+
The usage is the same as the original `docker/build-push-action`, but with the added benefit of using powerful WarpBuild's remote docker builders.
33
29
34
-
*[`setup-buildx`](https://github.com/docker/setup-buildx-action) action will
35
-
create and boot a builder using by default the [`docker-container` driver](https://docs.docker.com/build/building/drivers/docker-container/).
36
-
This is **not required but recommended** using it to be able to build
37
-
multi-platform images, export cache, etc.
38
-
*[`setup-qemu`](https://github.com/docker/setup-qemu-action) action can be
39
-
useful if you want to add emulation support with QEMU to be able to build
40
-
against more platforms.
41
-
*[`login`](https://github.com/docker/login-action) action will take care to
42
-
log in against a Docker registry.
30
+
> Note: We recommend to **not** use `docker/setup-buildx-action` as this action will automatically setup builders for you.
31
+
32
+
Additionally, this action requires an additional input called `profile-name` which is the name of the WarpBuild profile to use. Refer to the [WarpBuild documentation](https://docs.warpbuild.com/docker-builders#see-it-in-action) for more information on how to create and use profiles.
33
+
34
+
> Note: The `profile-name` input is required.
35
+
36
+
If you want to use this action on non-WarpBuild runners, you will also need to provide the `api-key` input. Learn more about creating an API key [here](https://docs.warpbuild.com/api-keys#creating-an-api-key).
43
37
44
38
### Git context
45
39
@@ -58,7 +52,7 @@ on:
58
52
59
53
jobs:
60
54
docker:
61
-
runs-on: ubuntu-latest
55
+
runs-on: warp-ubuntu-latest-x64-2x
62
56
steps:
63
57
-
64
58
name: Login to Docker Hub
@@ -69,15 +63,13 @@ jobs:
69
63
-
70
64
name: Set up QEMU
71
65
uses: docker/setup-qemu-action@v3
72
-
-
73
-
name: Set up Docker Buildx
74
-
uses: docker/setup-buildx-action@v3
75
66
-
76
67
name: Build and push
77
-
uses: docker/build-push-action@v6
68
+
uses: Warpbuilds/build-push-action@v6
78
69
with:
79
70
push: true
80
71
tags: user/app:latest
72
+
profile-name: super-fast-builder
81
73
```
82
74
83
75
Be careful because **any file mutation in the steps that precede the build step
@@ -94,11 +86,12 @@ to the default Git context:
94
86
```yaml
95
87
-
96
88
name: Build and push
97
-
uses: docker/build-push-action@v6
89
+
uses: Warpbuilds/build-push-action@v6
98
90
with:
99
91
context: "{{defaultContext}}:mysubdir"
100
92
push: true
101
93
tags: user/app:latest
94
+
profile-name: super-fast-builder
102
95
```
103
96
104
97
Building from the current repository automatically uses the [GitHub Token](https://docs.github.com/en/actions/security-guides/automatic-token-authentication),
@@ -109,10 +102,11 @@ named `GIT_AUTH_TOKEN` to be able to authenticate against it with Buildx:
109
102
```yaml
110
103
-
111
104
name: Build and push
112
-
uses: docker/build-push-action@v6
105
+
uses: Warpbuilds/build-push-action@v6
113
106
with:
114
107
push: true
115
108
tags: user/app:latest
109
+
profile-name: super-fast-builder
116
110
secrets: |
117
111
GIT_AUTH_TOKEN=${{ secrets.MYTOKEN }}
118
112
```
@@ -127,7 +121,7 @@ on:
127
121
128
122
jobs:
129
123
docker:
130
-
runs-on: ubuntu-latest
124
+
runs-on: warp-ubuntu-latest-x64-2x
131
125
steps:
132
126
-
133
127
name: Checkout
@@ -146,11 +140,12 @@ jobs:
146
140
uses: docker/setup-buildx-action@v3
147
141
-
148
142
name: Build and push
149
-
uses: docker/build-push-action@v6
143
+
uses: Warpbuilds/build-push-action@v6
150
144
with:
151
145
context: .
152
146
push: true
153
147
tags: user/app:latest
148
+
profile-name: super-fast-builder
154
149
```
155
150
156
151
## Examples
@@ -173,36 +168,7 @@ jobs:
173
168
174
169
## Summaries
175
170
176
-
This action generates a [job summary](https://github.blog/2022-05-09-supercharging-github-actions-with-job-summaries/)
177
-
that provides a detailed overview of the build execution. The summary shows an
178
-
overview of all the steps executed during the build, including the build inputs
The summary also includes a link for downloading the build record with
184
-
additional details about the build, including build stats, logs, outputs, and
185
-
more. The build record can be imported to Docker Desktop for inspecting the
186
-
build in greater detail.
187
-
188
-
> [!WARNING]
189
-
>
190
-
> If you're using the [`actions/download-artifact`](https://github.com/actions/download-artifact)
191
-
> action in your workflow, you need to ignore the build record artifacts
192
-
> if `name` and `pattern` inputs are not specified ([defaults to download all artifacts](https://github.com/actions/download-artifact?tab=readme-ov-file#download-all-artifacts) of the workflow),
193
-
> otherwise the action will fail:
194
-
> ```yaml
195
-
> - uses: actions/download-artifact@v4
196
-
> with:
197
-
> pattern: "!*.dockerbuild"
198
-
> ```
199
-
> More info: https://github.com/actions/toolkit/pull/1874
200
-
201
-
Summaries are enabled by default, but can be disabled with the
| `build-args` | List | List of [build-time variables](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-arg) |
233
199
| `build-contexts` | List | List of additional [build contexts](https://docs.docker.com/engine/reference/commandline/buildx_build/#build-context) (e.g., `name=path`) |
@@ -281,7 +247,6 @@ The following outputs are available:
281
247
282
248
See [TROUBLESHOOTING.md](TROUBLESHOOTING.md)
283
249
284
-
## Contributing
250
+
## Support
285
251
286
-
Want to contribute? Awesome! You can find information about contributing to
287
-
this project in the [CONTRIBUTING.md](/.github/CONTRIBUTING.md)
252
+
If you need help, please reach out to us on [Email](mailto:support@warpbuild.com) or [Website](https://app.warpbuild.com).
0 commit comments