gentle-umbrella-55872
05/10/2024, 11:15 AMkind: Build
type: container
spec.extraFlags
with a value of - --secret=id=npmrc,src=$HOME/.npmrc
to get credentials for a private npm registry.
But i get an error of Unable to run docker command "build… " $HOME/.npmrc: no such file or directory
But when i copy the hole build command from error message and run it out of garden dev
or garden build
just like docker build
with all garden build args it is working.gentle-umbrella-55872
05/10/2024, 11:24 AMtype: exed
to save the user directory path into a var which i can then use in the build step?gentle-umbrella-55872
05/10/2024, 11:33 AMyaml
kind: Run
type: exec
name: my-name
spec:
command:
- "echo"
- "~"
---
kind: Build
…
spec:
extraFlags:
- --secret=id=npmrc,src=${actions.run.my-name.outputs.log}/.npmrc
gentle-umbrella-55872
05/10/2024, 1:08 PMgentle-umbrella-55872
05/10/2024, 1:21 PMgentle-umbrella-55872
05/11/2024, 9:10 AMgentle-umbrella-55872
05/11/2024, 9:59 AMyaml
kind: Build
…
spec:
extraFlags:
- --secret=id=npmrc,src=${local.env.HOME}/.npmrc
bright-policeman-43626
05/13/2024, 7:25 AM