Skip to content
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

Possible false possible with matrix #261

Closed
orbegoso opened this issue Jan 18, 2023 · 1 comment
Closed

Possible false possible with matrix #261

orbegoso opened this issue Jan 18, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@orbegoso
Copy link

Running actionlint version

1.6.22
installed by building from source
built with go1.19.2 compiler for darwin/arm64

Given these steps

###

build_matrix:
  strategy:
    matrix:
      buildType: ${{ fromJson(fromJson(needs.setup.outputs.params).BUILD_TYPE_LIST) }}
      isDebug:
        - ${{ contains(fromJson('["Debug", "Both"]'), inputs.buildType) }}
      isRelease:
        - ${{ contains(fromJson('["Release", "Both"]'), inputs.buildType) }}
      exclude:
        - isDebug: false
          buildType: ${{ fromJson(fromJson(needs.setup.outputs.params).BUILD_TYPE_LIST)[0] }}
        - isRelease: false
          buildType: ${{ fromJson(fromJson(needs.setup.outputs.params).BUILD_TYPE_LIST)[1] }}

Returns the following error

.github/workflows/distribute_build.yml:80:22: value "false" in "exclude" does not exist in matrix "isdebug" combinations. possible values are "${{ contains(fromJson('[\"Debug\", \"Both\"]'), inputs.buildType) }}" [matrix]
   |
80 |           - isDebug: false
   |                      ^~~~~
.github/workflows/distribute_build.yml:82:24: value "false" in "exclude" does not exist in matrix "isrelease" combinations. possible values are "${{ contains(fromJson('[\"Release\", \"Both\"]'), inputs.buildType) }}" [matrix]
   |
82 |           - isRelease: false
   |                        ^~~~~

Seems like actionlint isn't evaluating the contains function to evaluate to a boolean.

@orbegoso
Copy link
Author

Confirm this is still happening on version 1.6.23.

@rhysd rhysd added the bug Something isn't working label Jul 18, 2023
@rhysd rhysd closed this as completed in c2c2e49 Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants