-
Notifications
You must be signed in to change notification settings - Fork 191
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
actionlint version tested : 1.6.23
Issue description:
Getting the actionlint validation failure "receiver of object dereference "refname" must be type of object but got "string"", but the workflow is showing the values as expected in github actions.
How to replicate:
Given the following (truncated) reusable workflow
workflow.yml:
name: Run test automation group
on:
workflow_call:
inputs:
test_data:
required: true
type: string
jobs:
run-tests:
runs-on: ubuntu-20.04
env:
COMPONENT: ${{ matrix.components.TEST.COMPONENT }}
PROFILE: ${{ matrix.components.TEST.PROFILE }}
strategy:
fail-fast: false
matrix:
components:
- ${{ fromJson(inputs.test_data).TESTS.TEST }}
steps:
- ...
actionlint fails on references to elements in the matrix:
grtest.yml:16:22: receiver of object dereference "test" must be type of object but got "string" [expression]
|
16 | COMPONENT: ${{ matrix.components.TEST.COMPONENT }}
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
grtest.yml:17:20: receiver of object dereference "test" must be type of object but got "string" [expression]
|
17 | PROFILE: ${{ matrix.components.TEST.PROFILE }}
Structure of the 'test_data' json input:
{
"GROUP": "Some group",
"TESTS": [
{
"TEST": {
"COMPONENT": "one_component"
}
},
{
"TEST": {
"COMPONENT": "another_component"
}
}
]
}
Github actions is able to reference these values without issues.
mike-stewart
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working