Skip to content

Commit

Permalink
Avoid double CI runs in default Github Actions generated config
Browse files Browse the repository at this point in the history
Otherwise CI will run once for every pull request update and once for
every push.

The disavantage is that people working on a non default branch without
creating pull requests won't get CI run at all.

I think the advantages are greater than the disadvantages, it's also my
personal workflow, and it's something desired enough so that someone
opened an issue about it.

So let's do it!

Co-authored-by: NeimadTL <damientalbot26@gmail.com>
  • Loading branch information
deivid-rodriguez and NeimadTL committed Aug 4, 2021
1 parent 74761aa commit 924d916
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: Ruby

on: [push,pull_request]
on:
push:
- <%= config[:git_default_branch] %>

pull_request:

jobs:
build:
Expand Down

0 comments on commit 924d916

Please sign in to comment.