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

Cannot use this action in a chain #25

Closed
LecrisUT opened this issue Dec 4, 2023 · 4 comments
Closed

Cannot use this action in a chain #25

LecrisUT opened this issue Dec 4, 2023 · 4 comments

Comments

@LecrisUT
Copy link

LecrisUT commented Dec 4, 2023

Example:

  test:
    uses: ...
    if: "! inputs.skip-tests"

  test-status:
    needs: [ test ]
    runs-on: ubuntu-latest
    steps:
      - uses: re-actors/alls-green@release/v1
        with:
          allowed-skips: test
          jobs: ${{ toJSON(needs) }}
    if: always()

  build:
    needs: [ test-status ]
    uses: ...

The latter job is not run, probably because of the needs of the former

Upvote & Fund

  • We're using Polar.sh so you can upvote and help fund this issue.
  • We receive the funding once the issue is completed & confirmed by you.
  • Thank you in advance for helping prioritize & fund our backlog.
Fund with Polar
@webknjaz
Copy link
Member

webknjaz commented Dec 4, 2023

That works in our own CI. Perhaps, yours is misconfigured somehow 🤷‍♂️.

Anyway, it's not something related to the action (as it only works with the inputs passed in), but is happening on the workflow definition level, which we wouldn't be able to control, even if we wanted to.

Closing as it's not a bug for us, but something on the calling side.

@webknjaz webknjaz closed this as completed Dec 4, 2023
@webknjaz
Copy link
Member

webknjaz commented Dec 4, 2023

If you want to run a job despite test-status failing, you'll have to stick if: always() there too. Although I don't know what use case this would actually support.

@LecrisUT
Copy link
Author

LecrisUT commented Dec 4, 2023

I should clarify the example given. The issue is when test job is skipped, test-status of course runs, but build is skipped as if the skip status propagated through. I'll make a mwe tomorrow.

Indeed this is a usage issue, but it is not intuitive how it should be configured, so some documentation would be helpful for such scenario.

@LecrisUT
Copy link
Author

LecrisUT commented Dec 5, 2023

@webknjaz here is a mwe if you have any pointers about it: https://github.com/LecrisUT/all-greens-example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants