* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
* [Keep up-to-date with GitHub Dependabot](#keep-up-to-date-with-github-dependabot)
* [Limitation](#limitation)
* [Limitation](#limitation)
@ -44,8 +45,8 @@ build-secrets, remote cache, etc. and different builder deployment/namespacing o
The default behavior of this action is to use the [Git context invoked by your workflow](https://github.com/docker/build-push-action/blob/master/src/context.ts#L35).
The default behavior of this action is to use the [Git context invoked by your workflow](https://github.com/docker/build-push-action/blob/master/src/context.ts#L35).
> :warning: Subdir for this context is [not yet supported](https://github.com/docker/build-push-action/issues/120).
<details>
> For the moment you can use the [path context](#path-context).
If you use this action in a private repository, you have to pass the [GitHub Token](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
If you use this action in a private repository, you have to pass the [GitHub Token](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token)
as a secret named `GIT_AUTH_TOKEN` to be able to authenticate against it with buildx:
as a secret named `GIT_AUTH_TOKEN` to be able to authenticate against it with buildx:
@ -97,10 +99,16 @@ as a secret named `GIT_AUTH_TOKEN` to be able to authenticate against it with bu
GIT_AUTH_TOKEN=${{ github.token }}
GIT_AUTH_TOKEN=${{ github.token }}
```
```
> :warning: Subdir for Git context is [not yet supported](https://github.com/docker/build-push-action/issues/120).
> For the moment you can use the [path context](#path-context).
### Path context
### Path context
You can also use the `PATH` context alongside the [`actions/checkout`](https://github.com/actions/checkout/) action.
You can also use the `PATH` context alongside the [`actions/checkout`](https://github.com/actions/checkout/) action.
<details>
<summary><b>Show workflow</b></summary>
```yaml
```yaml
name: ci
name: ci
@ -137,9 +145,13 @@ jobs:
push: true
push: true
tags: user/app:latest
tags: user/app:latest
```
```
</details>
### Isolated builders
### Isolated builders
<details>
<summary><b>Show workflow</b></summary>
```yaml
```yaml
name: ci
name: ci
@ -176,9 +188,13 @@ jobs:
builder: ${{ steps.builder2.outputs.name }}
builder: ${{ steps.builder2.outputs.name }}
target: mytarget2
target: mytarget2
```
```
</details>
### Multi-platform image
### Multi-platform image
<details>
<summary><b>Show workflow</b></summary>
```yaml
```yaml
name: ci
name: ci
@ -217,6 +233,7 @@ jobs:
user/app:latest
user/app:latest
user/app:1.0.0
user/app:1.0.0
```
```
</details>
## Advanced usage
## Advanced usage
@ -224,6 +241,9 @@ jobs:
For testing purposes you may need to create a [local registry](https://hub.docker.com/_/registry) to push images into.
For testing purposes you may need to create a [local registry](https://hub.docker.com/_/registry) to push images into.