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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃懛 Disable CI installing Material for MkDocs in forks #4410

Merged
merged 2 commits into from May 11, 2022
Merged

馃懛 Disable CI installing Material for MkDocs in forks #4410

merged 2 commits into from May 11, 2022

Conversation

dolfinus
Copy link
Contributor

A fix introduced in #2340 is not working properly if Github actions are enabled in the forked repo, and repo's author pushed a commit:
https://github.com/dolfinus/fastapi/runs/4766625638?check_suite_focus=true

This is because the if clause is checking github.event.pull_request.head.repo.fork context variable, but if workflow is triggered by commit push, there is no pull_request variables at all. Let's add a check for the event name

@codecov
Copy link

codecov bot commented May 11, 2022

Codecov Report

Merging #4410 (c275410) into master (f3b04a6) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##            master     #4410   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files          531       531           
  Lines        13629     13629           
=========================================
  Hits         13629     13629           

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update f3b04a6...c275410. Read the comment docs.

@github-actions
Copy link
Contributor

馃摑 Docs preview for commit c275410 at: https://627c38e30706a116565ae9a9--fastapi.netlify.app

@tiangolo tiangolo changed the title Disable build-docs workflow on a forked repo 馃懛 Disable CI installing Material for MkDocs in forks May 11, 2022
@tiangolo tiangolo merged commit 8c593a9 into tiangolo:master May 11, 2022
@tiangolo
Copy link
Owner

Awesome, thank you @dolfinus! 馃殌

@dolfinus dolfinus deleted the disable_build_docs_on_forked_repo branch May 12, 2022 08:45
JeanArhancet pushed a commit to JeanArhancet/fastapi that referenced this pull request Aug 20, 2022
Co-authored-by: Sebasti谩n Ram铆rez <tiangolo@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants