You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by tv...@apache.org on 2021/09/03 09:19:31 UTC

[buildstream] branch tristan/fix-external-fork-ci created (now 0b5326d)

This is an automated email from the ASF dual-hosted git repository.

tvb pushed a change to branch tristan/fix-external-fork-ci
in repository https://gitbox.apache.org/repos/asf/buildstream.git.


      at 0b5326d  .github/workflows/ci.yml: Use github concurrency feature instead of branch name globbing

This branch includes the following new commits:

     new 0b5326d  .github/workflows/ci.yml: Use github concurrency feature instead of branch name globbing

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


[buildstream] 01/01: .github/workflows/ci.yml: Use github concurrency feature instead of branch name globbing

Posted by tv...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

tvb pushed a commit to branch tristan/fix-external-fork-ci
in repository https://gitbox.apache.org/repos/asf/buildstream.git

commit 0b5326d8be50dbbc080828a079aaf1bc2e978210
Author: Tristan van Berkom <tr...@codethink.co.uk>
AuthorDate: Mon Aug 30 13:33:45 2021 +0900

    .github/workflows/ci.yml: Use github concurrency feature instead of branch name globbing
    
    The current approach to avoid redundant CI and trigger workflows is preventing
    pull requests from external repositories owned by users that are not in the
    apache github group.
---
 .github/workflows/ci.yml | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 63ec71f..f8cf547 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -1,25 +1,17 @@
 name: PR Checks
 
-# Run the CI if branches are pushed locally, allowing us to
-# run CI without the need of creating a pull request.
-#
-# Run the CI on pull requests only if they are from forked
-# repositories.
+# Pre-merge CI to run on push and pull_request events, even if this seems
+# redundant, we avoid concurrency with the below configuration.
 #
 on:
   push:
-    branches-ignore:
-    - gh-pages
-    - master
   pull_request:
-    types: [assigned, opened, synchronize, reopened]
-    branches:
-      # Branches from forks have the form 'user:branch-name' so we only run
-      # this job on pull_request events for branches that look like fork
-      # branches. Without this we would end up running this job twice for non
-      # forked PRs, once for the push and then once for opening the PR.
-    - '**:**'
 
+# Use the concurrency feature to ensure we don't run redundant workflows
+#
+concurrency:
+  group: ${{ github.repository }}-${{ github.ref }}-${{ github.workflow }}
+  cancel-in-progress: true
 
 # Left to-do:
 # - coverage