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

slawrence pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-daffodil.git


The following commit(s) were added to refs/heads/master by this push:
     new b1d4c54  Only run the SonarCloud action when triggered in the Daffodil 
repo
b1d4c54 is described below

commit b1d4c5412db985ecfdbb6fa6c860f8205991b902
Author: Steve Lawrence <[email protected]>
AuthorDate: Tue Mar 24 10:00:55 2020 -0400

    Only run the SonarCloud action when triggered in the Daffodil repo
    
    The SonarCloud action is currently configured to always run on any push,
    regardless of the repo that the branch was pushed to, including the main
    repo or any GitHub forks. And that action is configured to always use
    the Apache Daffodil SonarCloud project, which requires a SONAR_TOKEN
    secret that forks will not have. This means that any pushes to a fork
    will result in a failure of the SonarCloud action, which might be
    confusing to new users.
    
    This adds a condition to the SonarCloud job so that it is only run when
    the repository it was triggered from is the main Daffodil repository.
    This repo will always have the correct SONAR_TOKEN so that the action
    can succeed.
    
    DAFFODIL-2300
---
 .github/workflows/sonarcloud.yml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml
index 9c37277..58d6fe1 100644
--- a/.github/workflows/sonarcloud.yml
+++ b/.github/workflows/sonarcloud.yml
@@ -17,6 +17,7 @@ name: SonarCloud Workflow
 on: [push]
 jobs:
   sonarCloudTrigger:
+    if: github.repository == 'apache/incubator-daffodil'
     name: SonarCloud Trigger
     runs-on: ubuntu-latest
     strategy:

Reply via email to