-
Notifications
You must be signed in to change notification settings - Fork 163
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
Seems like actionlint lack support to detect when we call reusable workflow in the main workflow. #407
Comments
I can't fully understand your issue only from the code snippets, but I could not reproduce this from the following workflows. main.yml on: push
jobs:
Build-abc:
uses: ./.github/workflows/reusable_workflow.yml
run-abc-test:
needs: [Build-abc]
uses: ./.github/workflows/another_reusable_workflow.yml
with:
abc_value: ${{ needs.Build-abc.outputs.abc_version }} reusable_workflow.yml on:
workflow_call:
outputs:
abc_version:
description: "..."
value: "..."
jobs:
triage:
runs-on: ubuntu-latest
steps:
- run: echo reusable another_reusable_workflow.yml on:
workflow_call:
inputs:
abc_value:
description: "..."
type: string
jobs:
triage:
runs-on: ubuntu-latest
steps:
- run: echo another reusable actionlint reported no error. |
Please tell me entire workflows which can reproduce your issue. |
That is a real issue, here a another example:
As you can see, the matrix values is loaded from output of another job, so I am not surprised that the linter is not able to find it. For cases like this we need a way to disable the rule, as static checking cannot detect these: build:
strategy:
matrix: ${{ fromJson(needs.prepare.outputs.matrix) }} I think that this is a strong call for having some kind of |
Again, please tell me entire workflows which can reproduce your issue. |
For example, (All pseudo code)
In Main workflow:
we call reusable workflow like:
Then we want to use the abc_output from the reusable workflow as an input in another reusable workflow, we do something like:
This will make actionlint fail as
In .github/workflows/reusable_workflow.yml:
The text was updated successfully, but these errors were encountered: