Replies: 9 comments 4 replies
-
Thanks for the feedback - obviously there's a lot of considerations that we need to make when we think about required status checks, as many people really expect required status checks to really be required and that not running them (even due to configuration) is not sufficient. We'll have to think carefully about any changes, but it's definitely something that we'll consider. Thanks again. |
Beta Was this translation helpful? Give feedback.
-
It would be nice if we could end a job early with a specified conclusion (e.g. |
Beta Was this translation helpful? Give feedback.
-
Would it be possible to handle this at the branch protection level, by allowing users to define the conditions of their branch protection? Instead of assuming it's always "success", how about allowing us to override that by allowing "success" or "skipped" for a given workflow requirement? In my situation, I see required jobs stuck in pending status because some of their steps were skipped, even though all the steps that did run were successful. |
Beta Was this translation helpful? Give feedback.
-
One way to solve this problem that would also provide additional flexibility is to execute the # Run on all OSes for pushes, but only run on ubuntu for PRs
if: ${{ github.event_name == 'push' || (github.event_name == 'pull_request' && matrix.os == 'ubuntu-latest') }} This way, if an innner-matrix job is a required status check, it will be individually skipped and not block the build. |
Beta Was this translation helpful? Give feedback.
-
Another way to work around this currently is to use a dummy collector job that depends on the matrix jobs. Then in your branch protection rules just set the dummy collector job as required. When the matrix jobs are skipped so will the collector job and the protection rule will be satisfied. When the matrix jobs are not skipped then the collector job will only run and pass once all matrix entries for each job in the collector job's needs list succeed. I'm currently implementing this to skip build and test jobs for documentation-only changes. |
Beta Was this translation helpful? Give feedback.
-
I just ran into this issue when I wanted to skip certain jobs that use a matrix if no related files were changed. If the job is run, it has the name I'd rather be able to create all jobs specified by the matrix but then skip them individually or all at once. Maybe there should be a step to skip the remainder of a job like so:
Though I guess that'll cause issue with billing, so maybe @mwaddell's solution is better. |
Beta Was this translation helpful? Give feedback.
-
I'd agree the current As you see the only way to tell if I have jobs skipped in the matrix it to look at the execution time :) while "the normal" job result is skipped as expected. |
Beta Was this translation helpful? Give feedback.
-
actions/runner#662 would be another way to solve this (where you could exit a workflow early but successfully) |
Beta Was this translation helpful? Give feedback.
-
Originally posted by @minut1bc at actions/runner#952 ...
Beta Was this translation helpful? Give feedback.
All reactions