re-actors / alls-green

A check for whether the dependency jobs are all green.
https://github.com/marketplace/actions/alls-green
BSD 3-Clause "New" or "Revised" License
110 stars 12 forks source link

[TODO] Implement `allow-skips` #1

Closed webknjaz closed 2 years ago

webknjaz commented 2 years ago

This has been suggested by @pradyunsg.

Use-case: workflows that run jobs conditionally, depending on the files changed in associated PRs, for example — https://github.com/pypa/pip/blob/bbc7021/.github/workflows/ci.yml#L29-L49, using a change detection action like dorny/paths-filter.

webknjaz commented 2 years ago

@pradyunsg mind checking out the change? https://github.com/re-actors/alls-green/commit/3a2de129f0713010a71314c74e33c0e3ef90e696 https://github.com/webknjaz/check-gha-test/runs/4515033319?check_suite_focus=true#step:3:59

It is currently testable via the unstable branch:

- uses: re-actors/alls-green@unstable/v1
  id: check
  with:
    allowed-failures: failing-job0
    allowed-skips: failing-job1, skipped-job
    jobs: ${{ toJSON(needs) }}
webknjaz commented 2 years ago

Due to my impatience, I've published this under a stable release v1.1.0.

pradyunsg commented 2 years ago

The behaviour looks good to me!

webknjaz commented 2 years ago

Perfect! @pradyunsg should I make a PR in pip?

pradyunsg commented 2 years ago

Yes!