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

Now workflow calls can be nested #201

Closed
rhysd opened this issue Aug 24, 2022 · 2 comments
Closed

Now workflow calls can be nested #201

rhysd opened this issue Aug 24, 2022 · 2 comments
Labels
bug Something isn't working

Comments

@rhysd
Copy link
Owner

rhysd commented Aug 24, 2022

https://github.blog/changelog/2022-08-22-github-actions-improvements-to-reusable-workflows-2/

You can now nest up to 4 levels of reusable workflows giving you greater flexibility and better code reuse.

At least the following workflow should not cause an error.

on:
  workflow_call:
    inputs:
      message:
        description: additional message
        required: true
        type: string

jobs:
  call-another-workflow:
    uses: ./.github/workflows/another-workflow.yaml
    with:
      hello: ${{ inputs.message }}

actionlint currently reports an error as follows:

test.yaml:11:11: reusable workflow cannot be nested. but this workflow hooks "workflow_call" event at line:2,col:3 [workflow-call]
   |
11 |     uses: ./.github/workflows/another-workflow.yaml
   |           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@rhysd rhysd added the bug Something isn't working label Aug 24, 2022
@rhysd
Copy link
Owner Author

rhysd commented Aug 24, 2022

4 levels of reusable

I don't think actionlint can check levels statically (e.g. recursive call using if:).

@rhysd rhysd closed this as completed in 8db3e64 Aug 25, 2022
@rhysd
Copy link
Owner Author

rhysd commented Aug 28, 2022

This was fixed in v1.6.17.

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

1 participant