Skip to content

Adding a label containing an octothorpe (#) incorrectly results in the label being stripped #451

Open
@tomdoel

Description

@tomdoel

Contributing guidelines

I've found a bug, and:

  • The documentation does not mention anything about my problem
  • There are no open or closed issues that are related to my problem

Description

Specifying a label mylabel=foo#bar results in the label mylabel=foo. It appears that the octothorpe (#) is incorrectly interpreted as the start of a comment and the rest of the label is removed.

Expected behaviour

The Docker labels output of the action should include mylabel=foo#bar

Actual behaviour

The Docker labels output of the action includes mylabel=foo

Repository URL

No response

Workflow run URL

No response

YAML workflow

-
        name: Docker meta
        id: meta
        uses: docker/metadata-action@v5
        with:
          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
          labels: |
            mylabel=foo#bar

Workflow logs

No response

BuildKit logs

No response

Additional info

The behaviour was correct in v3.6.2 and seems to have broken around v3.7.0.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions