-
Notifications
You must be signed in to change notification settings - Fork 582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build args #557
Comments
I think you should write it like this.
|
That worked. Thanks |
Would be nice if this was documented. There are no examples at the examples link, and the documentation says it's a "List", which I interpreted to mean a YAML list, like build-args:
- foo=bar
- baz=yaz or build-args: [ 'foo=bar', 'baz=yaz' ] which GitHub Actions language server in VSCode tells me is not valid input. (I'm guessing only strings, numbers, and booleans are valid arguments to an action? You learn something new...) For reference, an example of an action that does document list-like syntax like this is actions/upload-artifact. |
docker/build-push-action#557 (comment) Signed-off-by: Kingdon Barrett <[email protected]>
I agree, I just found this discussion by searching for build args, since the readme offered no clarity and I assumed someone else had already complained 😁 |
Ah, I was going to submit a PR for an example, but I realized it is actually documented at the top of the parameters section: https://github.com/docker/build-push-action#customizing |
again this is not a YAML list, so the definition of the doc should be changed/updated |
* Update GHA versions to latest releases Add optional `dockerfile` input for non-default dockerfiles Add optional `build_args` input to support Docker build-args Add caching to Docker builds * Use separate input for extra build_args * Update build_args handling per docker/build-push-action#557 --------- Co-authored-by: Daniel McKnight <[email protected]>
Hope there example can be in the doc, it is easy to make mistake |
I am trying to setup docker build in Github actions
I have two args inside Dockerfile
ARG JFROG_PWD
ARG JFROG_USERNAME
Behaviour
In Dockerfile the command is = value="${JFROG_USERNAME}"
The first one (build-1) builds successfully, the Second one fails because the whole build args value is going to a single variable. like below
value=",JFROG_PWD="
Expected behavior - value="***"
I'm not able to figure out why the 2 build args are not setting values to their respective args inside Dockerfile when I am using docker/build-push-action@v2
The text was updated successfully, but these errors were encountered: