You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm using actionlint at my work to lint workflows and I encountered an error report which seems to be false-positive.
I have the following (very simplified) workflow:
which works fine on Github Actions, but actionlint reports an error for line runs-on: ${{ matrix.host-labels }} (see the online checker):
object, array, and null values should not be evaluated in template with ${{ }} but evaluating the value of type array
The workflow should run the job on 2 different self-hosted runners for which we defined our own labels. According to Github documentationruns-on supports either a string or a list of string:
Use jobs.<job_id>.runs-on to define the type of machine to run the job on. The machine can be either a GitHub-hosted runner or a self-hosted runner. You can provide runs-on as a single string or as an array of strings. If you specify an array of strings, your workflow will run on a self-hosted runner whose labels match all of the specified runs-on values, if available.
So, it seems that evaluating an array of string via ${{ }} should be allowed in this context.
How can I fix/workaround/disable this error for my workflows?
The text was updated successfully, but these errors were encountered:
This works and doesn't trigger lint errors.
However, it's not really convenient to apply such workaround in every workflow that uses self-hosted runners.
I'm using
actionlint
at my work to lint workflows and I encountered an error report which seems to be false-positive.I have the following (very simplified) workflow:
which works fine on Github Actions, but
actionlint
reports an error for lineruns-on: ${{ matrix.host-labels }}
(see the online checker):The workflow should run the job on 2 different self-hosted runners for which we defined our own labels. According to Github documentation
runs-on
supports either a string or a list of string:So, it seems that evaluating an array of string via
${{ }}
should be allowed in this context.How can I fix/workaround/disable this error for my workflows?
The text was updated successfully, but these errors were encountered: