[llvm] [Github] Prevent scorecard action from running on forks (PR #72780)

via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 18 20:31:57 PST 2023


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

<details>
<summary>Changes</summary>

Currently, the scorecard action runs on forks. This means that every recent fork will be periodically running a job that doesn't really make a lot of sense to run outside the main monorepo. This patch fixes that by restricting the job to only run in the monorepo.

---
Full diff: https://github.com/llvm/llvm-project/pull/72780.diff


1 Files Affected:

- (modified) .github/workflows/scorecard.yml (+1) 


``````````diff
diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml
index 270f58f777ce84d..3344ab19462acc2 100644
--- a/.github/workflows/scorecard.yml
+++ b/.github/workflows/scorecard.yml
@@ -22,6 +22,7 @@ jobs:
   analysis:
     name: Scorecard analysis
     runs-on: ubuntu-latest
+    if: github.repository = 'llvm/llvm-project'
     permissions:
       # Needed to upload the results to code-scanning dashboard.
       security-events: write

``````````

</details>


https://github.com/llvm/llvm-project/pull/72780


More information about the llvm-commits mailing list