Closed gastonfournier closed 1 year ago
This looks related to https://github.com/docker/bake-action/pull/141 :disappointed_relieved:
Not related but in your case you don't need to pass the value but just set the key of the build arg:
- uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/arm64
push: false
build-args: |
NPM_TOKEN=HELLO_WORLD
BUILD_ARG_PARAM
Seems linked to https://github.com/docker/build-push-action/pull/811. Before we were not handling comments for the inputs: https://github.com/docker/build-push-action/pull/811/files#diff-0cd594dddd6a9f2e3e26afebbb92716434437d7001c2416252aa7531e7f2b8d4L257-L262. But in the toolkit we are: https://github.com/docker/actions-toolkit/blob/acd3c9df19b24d46f4e2c40024e3dacc5f54bf88/src/util.ts#L39. Maybe we need https://github.com/docker/actions-toolkit/pull/115 after all.
This looks related to docker/bake-action#141 disappointed_relieved
Not related but in your case you don't need to pass the value but just set the key of the build arg:
- uses: docker/build-push-action@v4 with: context: . file: Dockerfile platforms: linux/arm64 push: false build-args: | NPM_TOKEN=HELLO_WORLD BUILD_ARG_PARAM
Yes, seems related. I'm going over your comments. For now pinning to v.4.0.0 helped us get unblocked but I'm more than happy to test some stuff to help with this ;)
Behaviour
After the latest release v4.1.0 there's an issue when using build args containing a hashtag
#
where everything after the hashtag is trimmed out (I believe it's being treated as a comment). In version 4.0.0 it works as expected (see this example run from main with the version 4.0.0 pinned)Steps to reproduce this issue
bug
Expected behaviour
The variable BUILD_ARG_PARAM should be passed on as is to
--build-arg
Actual behaviour
The variable BUILD_ARG_PARAM is trimmed from the hastag
#
Configuration
Logs