Skip to content

Use matrix variable in action step name #26307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
TheZoker opened this issue Aug 3, 2023 · 4 comments
Open

Use matrix variable in action step name #26307

TheZoker opened this issue Aug 3, 2023 · 4 comments
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.

Comments

@TheZoker
Copy link

TheZoker commented Aug 3, 2023

Feature Description

I want to use the a matrix value within the name of a step.
Something like this:

jobs:
  build:
    runs-on: ubuntu-latest
    container:
      image: catthehacker/ubuntu:act-latest
    strategy:
      matrix:
        include:
          - docker-id: "example-a"
          - docker-id: "example-b"
    steps:
      - name: Build and push Docker image ${{ matrix.docker-id }}
        ...

Currently the variable is not replaced with the value and is just displayed as is.

As reference: Github supports using a matrix variable name within the step name.

Screenshots

image

@TheZoker TheZoker added the type/proposal The new feature has not been accepted yet but needs to be discussed first. label Aug 3, 2023
@wolfogre wolfogre added the topic/gitea-actions related to the actions of Gitea label Aug 4, 2023
@wolfogre
Copy link
Member

wolfogre commented Aug 4, 2023

And it may also be needed to support other varibales, so I think it's related to #24604

@uchenna-madu
Copy link

try ${{ matrix.include.docker-id }}

@TheZoker
Copy link
Author

Unfortunately this does not work either:
image

@h0tw1r3
Copy link

h0tw1r3 commented Mar 2, 2024

Related to #28207

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic/gitea-actions related to the actions of Gitea type/proposal The new feature has not been accepted yet but needs to be discussed first.
Projects
None yet
Development

No branches or pull requests

4 participants