Skip to content

feat: allow variable references in a matrix #2069

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

Merged
merged 1 commit into from
Feb 23, 2025
Merged

feat: allow variable references in a matrix #2069

merged 1 commit into from
Feb 23, 2025

Conversation

pd93
Copy link
Member

@pd93 pd93 commented Feb 18, 2025

Fixes #2065

Based on-top of #2068, this allows ref to be used in a MatrixRow. For example:

version: '3'

vars:
  OS_VAR: ["windows", "linux", "darwin"]
  ARCH_VAR: ["amd64", "arm64"]

tasks:
  default:
    silent: true
    cmds:
      - for:
          matrix:
            OS:
              ref: OS_VAR
            ARCH:
              ref: ARCH_VAR
        cmd: echo "{{.ITEM.OS}}/{{.ITEM.ARCH}}"
windows/amd64
windows/arm64
linux/amd64
linux/arm64
darwin/amd64
darwin/arm64

@pd93 pd93 linked an issue Feb 18, 2025 that may be closed by this pull request
Base automatically changed from decoding-improvements to main February 22, 2025 15:44
@pd93 pd93 force-pushed the 2065-vars-in-matrix branch from 8778728 to e22569c Compare February 22, 2025 16:50
@pd93 pd93 merged commit d6234af into main Feb 23, 2025
14 checks passed
@pd93 pd93 deleted the 2065-vars-in-matrix branch February 23, 2025 18:13
pd93 added a commit that referenced this pull request Feb 23, 2025
@pd93
Copy link
Member Author

pd93 commented Feb 23, 2025

Just noticed that I missed any docs changes for this, so I added them alongside the changelog: cdaf69e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow to use vars in matrix
2 participants