Skip to content

Prevent CI from running on forks #9701

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

Closed
vpavic opened this issue Apr 30, 2021 · 2 comments · Fixed by #9717
Closed

Prevent CI from running on forks #9701

vpavic opened this issue Apr 30, 2021 · 2 comments · Fixed by #9717
Assignees
Labels
in: build An issue in the build type: enhancement A general enhancement

Comments

@vpavic
Copy link
Contributor

vpavic commented Apr 30, 2021

The project's GitHub Actions CI build has a hard dependency on some secrets (e.g. GRADLE_ENTERPRISE_CACHE_USERNAME), which causes the build to fail on the forks, causing unnecessary noise.

I've been greeted by one such build failure after syncing my fork today:
https://github.com/vpavic/spring-security/runs/2476329503?check_suite_focus=true

@vpavic vpavic added status: waiting-for-triage An issue we've not yet triaged type: enhancement A general enhancement labels Apr 30, 2021
@jzheaux
Copy link
Contributor

jzheaux commented Apr 30, 2021

I see that in pr-build-workflow there is the following declaration:

if: github.repository == 'spring-projects/spring-security'

I wonder if the same pattern can be applied to the jobs in continuous-integration-workflow.

Also, note that forks can disable actions via Settings > Actions.

@jzheaux jzheaux added in: build An issue in the build and removed status: waiting-for-triage An issue we've not yet triaged labels Apr 30, 2021
@vpavic
Copy link
Contributor Author

vpavic commented Apr 30, 2021

IMO such condition should exist on the CI workflow as well.

I'm aware that one can disable Actions in their fork, but I don't find it a reasonable expectation from 4.5k forks out there. Until GitHub comes to their senses and stops enabling Actions by default on forks, maintainers should ensure that forking their repos doesn't generate unnecessary noise for the users.

@jzheaux jzheaux self-assigned this Apr 30, 2021
jzheaux added a commit to jzheaux/spring-security that referenced this issue May 7, 2021
jzheaux added a commit that referenced this issue May 7, 2021
jzheaux added a commit that referenced this issue May 11, 2021
- There is no need to emit the value of RUN_JOBS to the rest of the
workflow. As a boolean, it is sufficient to ask whether or not the
corresponding output is present at all
- Prerequisites is apparently easy to misspell

Issue gh-9701
akohli96 pushed a commit to akohli96/spring-security that referenced this issue Aug 25, 2021
akohli96 pushed a commit to akohli96/spring-security that referenced this issue Aug 25, 2021
- There is no need to emit the value of RUN_JOBS to the rest of the
workflow. As a boolean, it is sufficient to ask whether or not the
corresponding output is present at all
- Prerequisites is apparently easy to misspell

Issue spring-projectsgh-9701
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: build An issue in the build type: enhancement A general enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants