-
The Question
This is how Travis, CircleCI, AppVeyor, and Azure DevOps integrations with GitHub all work…the default behavior is that all tasks must pass, and you can selectively mark tasks as optional. I’d like to be able to have an administrator set this one time and not have to change it every time we change our GitHub Actions flow. Background ContextConsider the screenshot below: This is taken from a pull request in a project I’m working on. The The pull request I’m proposing changes that GitHub Actions workflow, such that there is no longer a task called Thanks for the time and consideration! |
Beta Was this translation helpful? Give feedback.
Replies: 10 comments 17 replies
-
Unfortunately there isn’t a way to do this. I’ve had this issue in the past as well where I had a path exclusion filter set up to not run build workflows on non-code changes and they similarly blocked merges. I had to end up doing this as a workaround. |
Beta Was this translation helpful? Give feedback.
-
oh sad. Yeah I guess it is just something we’ll have to deal with. Not a big deal! Overall I’m still really liking GitHub Actions. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
-
@jameslamb I think another work around would be to create a job that “needs” the previous job:
https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idneeds but it costs an extra worker |
Beta Was this translation helpful? Give feedback.
-
oooo cool idea! That’s very clever, I like it. I think that would solve what I’m looking for, thank you. |
Beta Was this translation helpful? Give feedback.
-
here’s the PR [ci] add an allgood job for easy [required] builds by graingert · Pull Request #3351 · microsoft/LightGBM · GitHub |
Beta Was this translation helpful? Give feedback.
-
@graingert it was discovered that when dependencies don’t succeed, that Here's a short example: ---
on:
pull_request:
push:
jobs:
tests:
...
strategy:
matrix:
python-version:
# - ~3.12.0-0 # doesn't yet exist as of Oct 04, 2022
- ~3.11.0-0
- >-
3.10
- 3.9
...
continue-on-error: >- # this allows "unstable" versions to fail, except for 3.11, meaning 3.12 alpha when it's added
${{
(
startsWith(matrix.python-version, '~')
&& !startsWith(matrix.python-version, '~3.11')
)
&& true
|| false
}}
...
steps:
- ...
check: # This job does nothing and is only used for the branch protection
if: always()
needs:
- tests
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
... See https://github.com/marketplace/actions/alls-green#why. |
Beta Was this translation helpful? Give feedback.
-
How can we add/remove Details link ? |
Beta Was this translation helpful? Give feedback.
-
I run an app, Mergery, that does this. |
Beta Was this translation helpful? Give feedback.
-
This is really a problem, especially for large organizations/enterprises. AFAIK it is currently only possible to manually select status checks via "Require status checks to pass" at the repository or organization level, as part of a ruleset. An additional checkbox "Require all status checks to pass" would help a lot. |
Beta Was this translation helpful? Give feedback.
-
yep, this is shocking you can't require all configured checks to pass. I'd also expect this feature to be available |
Beta Was this translation helpful? Give feedback.
@graingert it was discovered that when dependencies don’t succeed, that
check
job is marked asskipped
which auto-merge treats the same way assuccess
. I solved this problem with https://github.com/re-actors/alls-green.Here's a short example: