-
Notifications
You must be signed in to change notification settings - Fork 641
Closed
Labels
kind/bugSomething isn't workingSomething isn't working
Description
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
- Run this workflow from the branch named
bug
- Check the output (example: https://github.com/gastonfournier/build-args-test/actions/runs/5243868766/jobs/9469101934#step:6:113)
Expected behaviour
The variable BUILD_ARG_PARAM should be passed on as is to --build-arg
/usr/bin/docker buildx build --build-arg NPM_TOKEN=HELLO_WORLD --build-arg BUILD_ARG_PARAM=pre-hashtag#post-hashtag --file Dockerfile --iidfile /tmp/docker-actions-toolkit-MqCSOI/iidfile --platform linux/arm64 --provenance mode=max,builder-id=https://github.com/gastonfournier/build-args-test/actions/runs/5243868766 --metadata-file /tmp/docker-actions-toolkit-MqCSOI/metadata-file .
Actual behaviour
The variable BUILD_ARG_PARAM is trimmed from the hastag #
/usr/bin/docker buildx build --build-arg NPM_TOKEN=HELLO_WORLD --build-arg BUILD_ARG_PARAM=pre-hashtag --file Dockerfile --iidfile /tmp/docker-actions-toolkit-MqCSOI/iidfile --platform linux/arm64 --provenance mode=max,builder-id=https://github.com/gastonfournier/build-args-test/actions/runs/5243868766 --metadata-file /tmp/docker-actions-toolkit-MqCSOI/metadata-file .
Configuration
- Repository URL (if public): https://github.com/gastonfournier/build-args-test
- Build URL (if public): https://github.com/gastonfournier/build-args-test/actions/runs/5243868766/jobs/9469101934#step:6:113
name: Continuous integration and deployment
on:
workflow_dispatch:
jobs:
build:
env:
BUILD_ARG_PARAM: undefined
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: docker/setup-qemu-action@v2
- uses: docker/setup-buildx-action@v2
- run: echo BUILD_ARG_PARAM=pre-hashtag#post-hashtag >> $GITHUB_ENV
- uses: docker/build-push-action@v4
with:
context: .
file: Dockerfile
platforms: linux/arm64
push: false
build-args: |
NPM_TOKEN=HELLO_WORLD
BUILD_ARG_PARAM=${{ env.BUILD_ARG_PARAM }}
Logs
Metadata
Metadata
Assignees
Labels
kind/bugSomething isn't workingSomething isn't working