Skip to content

Commit aec2756

Browse files
authored
Merge pull request #10566 from julek-wolfssl/membrowse-fork-guard
ci: don't run membrowse workflows on forks
2 parents 62c0c8f + 2703458 commit aec2756

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/membrowse-onboard.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ on:
1111

1212
jobs:
1313
load-targets:
14+
# Only run from the wolfssl org to avoid burning forks' CI minutes
15+
# and reporting fork builds to the membrowse backend.
16+
if: github.repository_owner == 'wolfssl'
1417
runs-on: ubuntu-24.04
1518
timeout-minutes: 10
1619
outputs:
@@ -25,12 +28,13 @@ jobs:
2528

2629
onboard:
2730
needs: load-targets
31+
if: github.repository_owner == 'wolfssl'
2832
runs-on: ubuntu-24.04
2933
timeout-minutes: 10
3034
strategy:
3135
fail-fast: false
3236
matrix:
33-
include: ${{ fromJson(needs.load-targets.outputs.matrix) }}
37+
include: ${{ fromJson(needs.load-targets.outputs.matrix || '[]') }}
3438

3539
steps:
3640
- name: Checkout repository

.github/workflows/membrowse-report.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@ concurrency:
1313

1414
jobs:
1515
load-targets:
16-
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
16+
# Only run from the wolfssl org to avoid burning forks' CI minutes
17+
# and reporting fork builds to the membrowse backend.
18+
if: github.repository_owner == 'wolfssl' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
1719
runs-on: ubuntu-24.04
1820
timeout-minutes: 10
1921
outputs:
@@ -27,7 +29,7 @@ jobs:
2729
run: echo "matrix=$(jq -c '.' .github/membrowse-targets.json)" >> $GITHUB_OUTPUT
2830

2931
check-changes:
30-
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
32+
if: github.repository_owner == 'wolfssl' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
3133
runs-on: ubuntu-24.04
3234
timeout-minutes: 5
3335
outputs:
@@ -64,13 +66,13 @@ jobs:
6466
6567
analyze:
6668
needs: [load-targets, check-changes]
67-
if: github.event_name != 'pull_request' || needs.check-changes.outputs.needs_build == 'true'
69+
if: github.repository_owner == 'wolfssl' && (github.event_name != 'pull_request' || needs.check-changes.outputs.needs_build == 'true')
6870
runs-on: ubuntu-24.04
6971
timeout-minutes: 10
7072
strategy:
7173
fail-fast: false
7274
matrix:
73-
include: ${{ fromJson(needs.load-targets.outputs.matrix) }}
75+
include: ${{ fromJson(needs.load-targets.outputs.matrix || '[]') }}
7476

7577
steps:
7678
- name: Checkout repository

0 commit comments

Comments
 (0)