Skip to content

Slash in tag converted to hyphen #189

@aaronadamsCA

Description

@aaronadamsCA

Behaviour

Steps to reproduce this issue

  1. Use tags: type=match,pattern=devcontainer/v(.*),group=1.
  2. Push tag devcontainer/v1.0.0.

Expected behaviour

Docker image version is 1.0.0.

Actual behaviour

Warning: devcontainer/v(.*) does not match devcontainer-v1.0.0.
Warning: No Docker image version has been generated. Check tags input.
Warning: No Docker tag has been generated. Check tags input.

Directory separator / is transformed to a hyphen -. This is unexpected and (I'm pretty sure) undocumented, so it should either be fixed or documented. Thanks!

Configuration

name: Build and push development container image
on:
  push:
    tags:
      - devcontainer/v*
jobs:
  build-and-push-image:
    runs-on: ubuntu-latest
    permissions:
      contents: read
      packages: write
    steps:
      - uses: actions/[email protected]

      - uses: docker/[email protected]
        with:
          platforms: arm64

      - uses: docker/[email protected]

      - uses: docker/[email protected]
        with:
          registry: ghcr.io
          username: ${{ github.actor }}
          password: ${{ secrets.GITHUB_TOKEN }}

      - id: meta
        uses: docker/[email protected]
        with:
          images: ghcr.io/${{ github.repository }}/devcontainer
          # This is the line that isn't working
          tags: type=match,pattern=devcontainer/v(.*),group=1

      - uses: docker/[email protected]
        with:
          context: .devcontainer
          labels: ${{ steps.meta.outputs.labels }}
          platforms: linux/amd64,linux/arm64
          push: true
          tags: ${{ steps.meta.outputs.tags }}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions