Allow to load env file (#80)

closes https://codeberg.org/woodpecker-plugins/docker-buildx/issues/34

Reviewed-on: https://codeberg.org/woodpecker-plugins/docker-buildx/pulls/80
Reviewed-by: anbraten <anbraten@noreply.codeberg.org>
Co-authored-by: qwerty287 <ndev@web.de>
Co-committed-by: qwerty287 <ndev@web.de>
This commit is contained in:
qwerty287 2023-10-08 08:49:51 +00:00 committed by qwerty287
parent c35b2e1ae9
commit 0f0aba7f82
2 changed files with 5 additions and 0 deletions

View File

@ -20,6 +20,10 @@ func main() {
godotenv.Overload("/run/drone/env")
}
if envFile, set := os.LookupEnv("PLUGIN_ENV_FILE"); set {
godotenv.Overload(envFile)
}
app := &cli.App{
Name: "docker-buildx",
Usage: "build docker container with DinD and buildx",

View File

@ -122,6 +122,7 @@ If it's not a tag event, and no default branch, automated tags are skipped.
| `add_host` | *none* | sets additional host:ip mapping
| `output` | *none* | sets build output in format `type=<type>[,<key>=<value>]`
| `logins` | *none* | option to log into multiple registries
| `env_file` | *none* | load env vars from specified file
## Multi registry push example