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

"is not defined in object type" error with marketplace action #18

Closed
frank-long opened this issue Jul 30, 2021 · 9 comments
Closed

"is not defined in object type" error with marketplace action #18

frank-long opened this issue Jul 30, 2021 · 9 comments
Labels
bug Something isn't working false-positive False positive

Comments

@frank-long
Copy link

frank-long commented Jul 30, 2021

I'm using dorny/paths-filter and that sets a dynamic output for me, but actionlint is complaining about the output not being there, see code below. I can't see how I can fix that.

- name: Checkout repo
        uses: actions/checkout@v2
      - id: filterchanges
        uses: dorny/paths-filter@v2
        with:
          filters: 'files: .github/workflows/*.yml'
      - name: lint
        if: ${{ steps.filterchanges.outputs.files == 'true'}}
[actionlint] reported by reviewdog 🐶 property "files" is not defined in object type {changes: any} [expression]


@frank-long
Copy link
Author

If I change to: ${{ steps.filterchanges.outputs.changes.files == 'true'}} then it won't complain, but it won't run the code because it won't evaluate to true: see https://github.com/dorny/paths-filter. Something is wrong the actionlint I suspect

@rhysd
Copy link
Owner

rhysd commented Jul 30, 2021

It's because the files output is not defined in action.yml. Is it really correct output name?

https://github.com/dorny/paths-filter/blob/v2/action.yml#L47-L49

@rhysd
Copy link
Owner

rhysd commented Jul 30, 2021

I'm not familiar with the action, but it seems to set its outputs dynamically. So it looks not possible to check them statically.

@frank-long
Copy link
Author

Yes they are set dynamically in that action. Is there a way to disable this check on this line so I can still run without reporting a failure in my CI?

@rhysd
Copy link
Owner

rhysd commented Jul 30, 2021

Would you try -ignore {regex} command line argument to filter out some errors? I'll fix this false positive on next patch update, hopefully released tomorrow or day after tomorrow (in JST).

@rhysd rhysd added the bug Something isn't working label Jul 30, 2021
@rhysd rhysd added the false-positive False positive label Jul 30, 2021
@rhysd rhysd closed this as completed in 8fcbdc3 Jul 31, 2021
@rhysd
Copy link
Owner

rhysd commented Aug 2, 2021

The fix was included in release v1.5.2.

@rayray
Copy link

rayray commented Mar 21, 2023

@rhysd Apologies if this is already documented somewhere, but can you share how to set the skip_outputs flag from CLI? Or config file?

@ventsyv
Copy link

ventsyv commented Apr 4, 2023

When I run actionlint, I get

property "jf_docker_url" is not defined in object type {actions_runner_debug: string; actions_step_debug: string; github_token: string; jf_access_token: string; jf_base_url: string; jf_url: string} [expression]
    |
115 |           jf_url: ${{ secrets.JF_DOCKER_URL }}

Obviously there is a repo secret defined with that name.
Should I open a new issue?

@fairclothjm
Copy link

fairclothjm commented Jun 12, 2023

Hi, I am getting this error and I can't get the skip_outputs setting to work properly to ignore outputs. Are there any plans to extend the actionlint config file to ignore jobs/steps or take the ignore regex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working false-positive False positive
Projects
None yet
Development

No branches or pull requests

5 participants