How to configure Travis-CI to build pull requests & merges to master w/o redundancy

前端 未结 6 511
一整个雨季
一整个雨季 2021-01-30 08:20

To put it in \"BDD\" terms:

Background:
Given I\'m contributing to a GH repo

When I create a pull request
Then Travis shou

6条回答
  •  我在风中等你
    2021-01-30 08:50

    For one of the repositories, I was working with, here is what I wanted:

    There is an origin repo which is the main repo which does all the releases.

    I wanted that all the pull requests coming to master branch of origin should be built with Travis only once irrespective of the fact that it comes from a forked repo or any other branch of the origin itself.

    For this case, this works like a charm

    if: (type == push) OR (type == pull_request AND fork == true)

提交回复
热议问题