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

A "required" workflow is not started because of ignored files but the results are still required to submit the PR #1281

Closed
1 of 6 tasks
f-squirrel opened this issue Jul 22, 2020 · 12 comments
Assignees
Labels

Comments

@f-squirrel
Copy link

Describe the bug
A "required" GitHub Action is not started because a PR's content is ignored by the action rules.
However, GitHub requires the results of the check.
As a result, the PR cannot be merged.

The link to PR.
The action is "clang-tidy".
Link to the workflow.

Area for Triage:

Bug

Virtual environments affected

  • macOS 10.15
  • Ubuntu 16.04 LTS
  • Ubuntu 18.04 LTS
  • Ubuntu 20.04 LTS
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
I'd expect the required check to be ignored by GitHub.

@maxim-lobanov
Copy link
Contributor

Hello @f-squirrel , probably, this workflow is marked as required check in your branch policies.
Could you please check it? You can follow this guide: https://docs.github.com/en/github/administering-a-repository/enabling-required-status-checks

@f-squirrel
Copy link
Author

@maxim-lobanov , thank you for the quick response.
Yes, the workflow is marked as required.
Do I understand correctly that a required check cannot be ignored even if a changed file is ignored by the workflow's rules?

@maxim-lobanov
Copy link
Contributor

Yes, it is correct. Required check means that workflow MUST pass to merge the PR

@f-squirrel
Copy link
Author

@maxim-lobanov , it looks like a bug.

I'd expect a required workflow to return "true" if the PR's content is ignored by the workflow's rules.
Does it sound reasonable?

f-squirrel added a commit to f-squirrel/concord-bft that referenced this issue Jul 23, 2020
Reason:
A PR cannot be submitted if a required check did not run.
Even if the PR's content is ignored by the check.

More information:
actions/runner-images#1281
@mscoutermarsh
Copy link

Hi @f-squirrel, we have an internal issue open tracking this problem. We've added your case to it.

It's currently working as we had intended it. Required checks must have a success status for a merge to happen.

This edge case is frustrating though. We've been discussing other ways to handle it. Such as looking if other commits have a success status. Your issue was added to the list, thanks for letting us know.

@JavierSegoviaCordoba
Copy link

JavierSegoviaCordoba commented Jun 21, 2021

I think this issue should not be closed. Even I like having the [skip ci] approach, it adds noise to the commits history, so I don't understand why an intended skipped CI just provokes a dead PR that has to be merged, forced, manually by an administrator.

EDIT: [skip ci] is not working too :/

@alberttorosyan
Copy link

I have a similar issue. PR workflow runs only for certain directories, but when enabling check in branch protection rules, other PRs cannot be merged (since waiting for the check status).
@f-squirrel how did you overcome this? Is there any workaround I can employ here? Thanks in advance!

@f-squirrel
Copy link
Author

Hi @alberttorosyan,
Unfortunately, I did not: any change triggers the CI...

@alberttorosyan
Copy link

Hi @alberttorosyan,
Unfortunately, I did not: any change triggers the CI...

@f-squirrel I was thinking of running the CI for every pull request, but checking the change list within the pipeline. It seems this is maximum we can achieve with current state of Github Actions...

@kurtpattyn-tomtom
Copy link

This issue has been closed. What is the solution? I am encountering the same issue.

@hariso
Copy link

hariso commented Jul 13, 2022

I'm interested in a solution for this too.

@stjepanGrego
Copy link

The solution I found is to run a workflow on all file changes but ignore and skip steps with https://github.com/tj-actions/changed-files if specific files are not changed. This way workflow is marked as success and it finishes in a few seconds.

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

No branches or pull requests

8 participants