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

🌱 Switch from paths-ignore to changed-files action to skip required checks. #2566

Merged
merged 2 commits into from
Dec 27, 2022

Conversation

spencerschrock
Copy link
Member

Signed-off-by: Spencer Schrock [email protected]

What kind of change does this PR introduce?

CI fix

What is the current behavior?

Due to path filtering, PRs which only change Markdown files will never run the steps in docker.yml:

on:
push:
branches:
- main
paths-ignore:
- "*.md"
pull_request:
branches:
- main
paths-ignore:
- "*.md"

Since these checks are (currently) required, PRs which only change Markdown files can never be merged. See #2565 and #2508. As long as these checks are required, there's no native way to solve this for reasons summarized well in this blog post.

What is the new behavior (if this is a feature change)?**

A third party action is used to detect doc only changes. Since skipped checks count as passing for required checks, this allows for doc only changes to merge.

  • Tests for the changes have been added (for bug fixes/features)

Which issue(s) this PR fixes

NONE

Special notes for your reviewer

I tested this with a few PRs in a fork here:
spencerschrock/scorecard-test#3
spencerschrock/scorecard-test#8

Does this PR introduce a user-facing change?

For user-facing changes, please add a concise, human-readable release note to
the release-note

(In particular, describe what changes users might need to make in their
application as a result of this pull request.)

NONE

…y changes to pass CI, which are currently blocked waiting for these required checks which will never run due to the path filter.

Signed-off-by: Spencer Schrock <[email protected]>
@spencerschrock spencerschrock added the github_actions Pull requests that update Github_actions code label Dec 22, 2022
@spencerschrock spencerschrock temporarily deployed to integration-test December 22, 2022 21:26 — with GitHub Actions Inactive
.github/workflows/docker.yml Fixed Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #2566 (bcc97fa) into main (c6d7680) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2566   +/-   ##
=======================================
  Coverage   40.03%   40.03%           
=======================================
  Files         122      122           
  Lines        9865     9865           
=======================================
  Hits         3949     3949           
  Misses       5635     5635           
  Partials      281      281           

@github-actions
Copy link

Integration tests success for
[348fc57]
(https://github.com/ossf/scorecard/actions/runs/3761267340)

@raghavkaul
Copy link
Contributor

Thanks for this change! Looks good to me.

Copy link
Member

@naveensrinivasan naveensrinivasan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks

…ince cloud build handles the images.

Signed-off-by: Spencer Schrock <[email protected]>
@spencerschrock spencerschrock temporarily deployed to integration-test December 23, 2022 18:38 — with GitHub Actions Inactive
@spencerschrock spencerschrock enabled auto-merge (squash) December 23, 2022 18:45
@github-actions
Copy link

Integration tests success for
[bcc97fa]
(https://github.com/ossf/scorecard/actions/runs/3767594119)

@spencerschrock spencerschrock merged commit 6bf19d5 into ossf:main Dec 27, 2022
@spencerschrock spencerschrock deleted the docker-ci-fix branch December 27, 2022 19:01
raghavkaul pushed a commit to raghavkaul/scorecard that referenced this pull request Feb 9, 2023
…hecks. (ossf#2566)

* Switch from paths-ignore to changed-files action. This allows doc only changes to pass CI, which are currently blocked waiting for these required checks which will never run due to the path filter.

Signed-off-by: Spencer Schrock <[email protected]>

* Pin checkout action. Disable redundant docker build on push to main since cloud build handles the images.

Signed-off-by: Spencer Schrock <[email protected]>

Signed-off-by: Spencer Schrock <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update Github_actions code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants