Skip to content

Version 2.2.0 ignores quotation marks in input parameter "driver-opts" #173

@sugibuchi

Description

@sugibuchi

Behaviour

Since version v.2.2.0, docker/setup-buildx-action does not pass quotation marks in input param driver-opts to command line arguments of docker buildx create.

Steps to reproduce this issue

  1. Run the following POC workflow.
on: [ workflow_dispatch ]

jobs:
  test:
    runs-on: [ ***** ]
    steps:
      - run: docker context create test
    
      - uses: docker/[email protected]
        with:
          endpoint: test
          driver-opts: |
            "env.no_proxy=localhost,127.0.0.1,.mydomain"

      - uses: docker/[email protected]
        with:
          endpoint: test
          driver-opts: |
            "env.no_proxy=localhost,127.0.0.1,.mydomain"
  1. Compare output of "Creating a new builder instance" step between v2.1.0 and v2.2.0

Expected behaviour

In both versions, value of --driver-opt should be enclosed by double quotes like --driver-opt "env.no_proxy=localhost,127.0.0.1,.mydomain"

Actual behaviour

Run docker/[email protected]
...
Creating a new builder instance
  /usr/local/bin/docker buildx create --name builder-eab86ad6-6a45-4c69-b626-e059ae515957 --driver docker-container --driver-opt "env.no_proxy=localhost,127.0.0.1,.mydomain" --buildkitd-flags --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host --use test
Run docker/[email protected]
...
Creating a new builder instance
  /usr/local/bin/docker buildx create --name builder-50be5891-6e8d-43b6-8c23-bc75aa44d03a --driver docker-container --driver-opt env.no_proxy=localhost,127.0.0.1,.mydomain --buildkitd-flags --allow-insecure-entitlement security.insecure --allow-insecure-entitlement network.host --use test
ERROR: invalid value "127.0.0.1", expecting k=v

As you can see, the value of --driver-opt is not enclosed by " in the execution of v2.2.0.

Configuration

  • GitHub Enterprise Server 3.6.2
  • Self-hosted runner deployed by ARC
  • Runner version: 2.298.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions