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

[CI] Skipping workflow runs on forks #3429

Closed
DelusionalOptimist opened this issue Jul 10, 2021 · 3 comments · Fixed by #3432
Closed

[CI] Skipping workflow runs on forks #3429

DelusionalOptimist opened this issue Jul 10, 2021 · 3 comments · Fixed by #3432
Assignees
Labels
area/ci Continuous Integration good first issue Good for newcomers help wanted Extra attention is needed

Comments

@DelusionalOptimist
Copy link
Contributor

Originally raised by @samirparhi-dev in https://discuss.layer5.io/t/github-wf-issue-during-pull-request/125

Current Behavior

When a contributor pushes to their fork, many workflows which should ideally run only on https://github.com/meshery/meshery also get triggered. They need some secrets to complete successfully but we don't provide secrets to our forks because it may have bad consequences. Thus the runs end up failing on forks which is annoying.

Desired Behavior

Recognize such workflows and add conditions to trigger them only when a commit is created in https://github.com/meshery/meshery.

Implementation

Example workflow https://github.com/meshery/meshery/blob/master/.github/workflows/build-and-release-edge.yml
Change the job

    name: Docker build and push
    env:

to

    name: Docker build and push
    if: github.repository == 'meshery/meshery'
    env:
@DelusionalOptimist DelusionalOptimist added good first issue Good for newcomers area/ci Continuous Integration labels Jul 10, 2021
@piyushsingariya piyushsingariya added the help wanted Extra attention is needed label Jul 10, 2021
@iamsdas
Copy link
Member

iamsdas commented Jul 10, 2021

I'd like to take up this issue

@sayantan1413
Copy link
Member

Hey @iamsdas go ahead.🚀

@Nikhil-Ladha
Copy link
Member

Much needed update. We need this in many of the workflows, the netlify preview workflow also needs to be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/ci Continuous Integration good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants