[llvm] [Github] Add repository checks to release-binaries workflow (PR #84437)

Aiden Grossman via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 7 23:10:27 PST 2024


https://github.com/boomanaiden154 created https://github.com/llvm/llvm-project/pull/84437

This patch adds repository checks to the release-binaries workflow jobs. People were observing that the job was running on a schedule in their forks. This only happens on old forks, but those probably exist in great number given how prolific LLVM is. This is also good practice anyways, on top of solving the direct problem of these jobs running with the cron schedule on people's forks.

>From 0f9dec14969cfefaea9599104639df10203e7f75 Mon Sep 17 00:00:00 2001
From: Aiden Grossman <agrossman154 at yahoo.com>
Date: Thu, 7 Mar 2024 23:08:57 -0800
Subject: [PATCH] [Github] Add repository checks to release-binaries workflow

This patch adds repository checks to the release-binaries workflow jobs.
People were observing that the job was running on a schedule in their
forks. This only happens on old forks, but those probably exist in great
number given how prolific LLVM is. This is also good practice anyways,
on top of solving the direct problem of these jobs running with the cron
schedule on people's forks.
---
 .github/workflows/release-binaries.yml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index ebf6fa41898dc4..e487b0f1d4b5d6 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -35,6 +35,7 @@ jobs:
   prepare:
     name: Prepare to build binaries
     runs-on: ubuntu-22.04
+    if: github.repository == 'llvm/llvm-project'
     outputs:
       release-version: ${{ steps.vars.outputs.release-version }}
       flags: ${{ steps.vars.outputs.flags }}
@@ -85,6 +86,7 @@ jobs:
     name: "Fill Cache ${{ matrix.os }}"
     needs: prepare
     runs-on: ${{ matrix.os }}
+    if: github.repository == 'llvm/llvm-project'
     strategy:
       matrix:
         os:
@@ -119,6 +121,7 @@ jobs:
       - prepare
       - fill-cache
     runs-on: ${{ matrix.target.runs-on }}
+    if: github.repository == 'llvm/llvm-project'
     strategy:
       fail-fast: false
       matrix:



More information about the llvm-commits mailing list