[前][次][番号順一覧][スレッド一覧]

ruby-changes:67441

From: David <ko1@a...>
Date: Tue, 31 Aug 2021 19:07:29 +0900 (JST)
Subject: [ruby-changes:67441] 2e30d9ab42 (master): [rubygems/rubygems] Avoid double CI runs in default Github Actions generated config

https://git.ruby-lang.org/ruby.git/commit/?id=2e30d9ab42

From 2e30d9ab427e71d2c27d5873abbe7320d456d066 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?David=20Rodr=C3=ADguez?= <deivid.rodriguez@r...>
Date: Wed, 4 Aug 2021 10:56:01 +0200
Subject: [rubygems/rubygems] Avoid double CI runs in default Github Actions
 generated config

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!

https://github.com/rubygems/rubygems/commit/924d916a73

Co-authored-by: NeimadTL <damientalbot26@g...>
---
 lib/bundler/templates/newgem/github/workflows/main.yml.tt | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lib/bundler/templates/newgem/github/workflows/main.yml.tt b/lib/bundler/templates/newgem/github/workflows/main.yml.tt
index 6549780..2a6c505 100644
--- a/lib/bundler/templates/newgem/github/workflows/main.yml.tt
+++ b/lib/bundler/templates/newgem/github/workflows/main.yml.tt
@@ -1,6 +1,10 @@ https://github.com/ruby/ruby/blob/trunk/lib/bundler/templates/newgem/github/workflows/main.yml.tt#L1
 name: Ruby
 
-on: [push,pull_request]
+on:
+  push:
+    - <%= config[:git_default_branch] %>
+
+  pull_request:
 
 jobs:
   build:
-- 
cgit v1.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]