1
0
Fork 0
mirror of https://github.com/thoughtbot/factory_bot.git synced 2022-11-09 11:43:51 -05:00

Skip double CI build on main branch pull requests (#1491)

Why:
----

The trigger for the build job is either a `push` or a `pull_request`.
When a pull request is opened against master two CI run start, since
both triggers are valid.

This Commit:
----

- Skip the build job if the event is a pull request made from the same
repository. Since a CI build job hast started already because a push
trigger was detected.
This commit is contained in:
Alejandro Dustet 2021-06-04 11:54:03 -04:00 committed by GitHub
parent 23162d4348
commit 5eb1db726f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@ on:
jobs:
build:
name: Ruby ${{ matrix.ruby }} / Rails ${{ matrix.rails }}
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
fail-fast: false
matrix: