Skip to content

Commit fae9cd4

Browse files
committed
fix: only allow workflows from the main repository
1 parent 0de0617 commit fae9cd4

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

.github/workflows/test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ on:
55
paths-ignore:
66
- 'documents/**'
77
- 'assets/**'
8+
pull_request:
9+
branches:
10+
- main
11+
types: [opened, synchronize, reopened]
812
# Allows you to run this workflow manually from the Actions tab
913
workflow_dispatch:
1014

@@ -18,8 +22,9 @@ jobs:
1822
strategy:
1923
fail-fast: false
2024
matrix:
21-
kernel: [ "5.4", "5.15", "6.8", "6.10" ]
25+
kernel: [ 5.4, 5.15, 6.8, 6.10 ]
2226
runs-on: ${{ matrix.kernel }}
27+
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
2328
steps:
2429
- uses: actions/checkout@v4
2530
with:

.github/workflows/verify.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,9 @@ jobs:
1717
max-parallel: 1 # Avoid resource contention
1818
fail-fast: false
1919
matrix:
20-
kernel: [ "5.4", "5.15", "6.8", "6.10" ]
20+
kernel: [ 5.4, 5.15, 6.8, 6.10 ]
2121
runs-on: ${{ matrix.kernel }}
22+
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
2223
steps:
2324
- uses: actions/checkout@v4
2425
with:

0 commit comments

Comments
 (0)