1
0
Fork 0
mirror of https://github.com/docker/build-push-action.git synced 2025-04-14 02:46:02 +02:00
This commit is contained in:
Nelson Wolf 2025-04-10 10:17:20 +01:00 committed by GitHub
commit 657735ce4a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -80,12 +80,13 @@ jobs:
tags: user/app:latest
```
Be careful because **any file mutation in the steps that precede the build step
will be ignored, including processing of the `.dockerignore` file** since
the context is based on the Git reference. However, you can use the
[Path context](#path-context) using the [`context` input](#inputs) alongside
the [`actions/checkout`](https://github.com/actions/checkout/) action to remove
this restriction.
**Important Considerations for Git Context**
* **File Mutations** perfomred during your workflow will **not** be reflected in the final Docker image.
* **.dockerignore** is ignored altogether when using git context.
You can remove these limitations by using the [path context](#path-context) input alongside the [`actions/checkout`](https://github.com/actions/checkout/) action.
Default Git context can also be provided using the [Handlebars template](https://handlebarsjs.com/guide/)
expression `{{defaultContext}}`. Here we can use it to provide a subdirectory