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

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new fb4d8c6282f Prevent CI workflows from running on forks (#8435)
fb4d8c6282f is described below

commit fb4d8c6282fc9746ff423cdaf70ef788dc8ec4e7
Author: Tom Cunningham <tcunn...@redhat.com>
AuthorDate: Tue Sep 27 07:02:10 2022 -0400

    Prevent CI workflows from running on forks (#8435)
---
 .github/workflows/alternative-os-build.yml  | 1 +
 .github/workflows/component-pr.yaml         | 1 +
 .github/workflows/depsreview.yaml           | 1 +
 .github/workflows/generic-pr.yaml           | 1 +
 .github/workflows/main-checkstyle-build.yml | 1 +
 .github/workflows/main-push-build.yml       | 1 +
 .github/workflows/pr-build.yml              | 2 ++
 7 files changed, 8 insertions(+)

diff --git a/.github/workflows/alternative-os-build.yml 
b/.github/workflows/alternative-os-build.yml
index b801250f9d2..9d23705a672 100644
--- a/.github/workflows/alternative-os-build.yml
+++ b/.github/workflows/alternative-os-build.yml
@@ -29,6 +29,7 @@ permissions:
 
 jobs:
   build:
+    if: github.repository == 'apache/camel'
     runs-on: ${{ matrix.os }}
     strategy:
       matrix:
diff --git a/.github/workflows/component-pr.yaml 
b/.github/workflows/component-pr.yaml
index 4eb21bbf279..95a70a8310f 100644
--- a/.github/workflows/component-pr.yaml
+++ b/.github/workflows/component-pr.yaml
@@ -32,6 +32,7 @@ on:
 permissions: {}
 jobs:
   process:
+    if: github.repository == 'apache/camel'
     permissions:
       pull-requests: write # to comment on a pull request
       actions: read # to download artifact
diff --git a/.github/workflows/depsreview.yaml 
b/.github/workflows/depsreview.yaml
index a25de591ba3..3d85510ec36 100644
--- a/.github/workflows/depsreview.yaml
+++ b/.github/workflows/depsreview.yaml
@@ -6,6 +6,7 @@ permissions:
 
 jobs:
   dependency-review:
+    if: github.repository == 'apache/camel'
     runs-on: ubuntu-latest
     steps:
       - name: 'Checkout Repository'
diff --git a/.github/workflows/generic-pr.yaml 
b/.github/workflows/generic-pr.yaml
index 3da41b2933b..9042185aa13 100644
--- a/.github/workflows/generic-pr.yaml
+++ b/.github/workflows/generic-pr.yaml
@@ -29,6 +29,7 @@ permissions:
 
 jobs:
   process:
+    if: github.repository == 'apache/camel'
     permissions:
       contents: read  # for actions/labeler to determine modified files
       pull-requests: write  # for actions/labeler to add labels to PRs
diff --git a/.github/workflows/main-checkstyle-build.yml 
b/.github/workflows/main-checkstyle-build.yml
index ef9178558f1..88c813a7be6 100644
--- a/.github/workflows/main-checkstyle-build.yml
+++ b/.github/workflows/main-checkstyle-build.yml
@@ -29,6 +29,7 @@ permissions:
 
 jobs:
   build:
+    if: github.repository == 'apache/camel'
     runs-on: ubuntu-latest
     strategy:
       matrix:
diff --git a/.github/workflows/main-push-build.yml 
b/.github/workflows/main-push-build.yml
index 33c9e0b929c..4d8fb7a523e 100644
--- a/.github/workflows/main-push-build.yml
+++ b/.github/workflows/main-push-build.yml
@@ -32,6 +32,7 @@ on:
 permissions: {}
 jobs:
   build:
+    if: github.repository == 'apache/camel'
     permissions:
       contents: write # to create branch (peter-evans/create-pull-request)
       pull-requests: write # to create a PR (peter-evans/create-pull-request)
diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml
index c9e4846c309..b8c5f9dc89f 100644
--- a/.github/workflows/pr-build.yml
+++ b/.github/workflows/pr-build.yml
@@ -32,6 +32,7 @@ on:
 
 jobs:
   checkstyle:
+    if: github.repository == 'apache/camel'
     runs-on: ubuntu-latest
     steps:
     - uses: actions/checkout@v3
@@ -54,6 +55,7 @@ jobs:
         name: checkstyle.log
         path: checkstyle.log
   build:
+    if: github.repository == 'apache/camel'
     permissions:
       issues: write
     runs-on: ubuntu-latest

Reply via email to