Skip to content

Commit 0972a1b

Browse files
committed
[ci] restrict jobs from running on forks
1 parent e8f02e9 commit 0972a1b

File tree

7 files changed

+12
-5
lines changed

7 files changed

+12
-5
lines changed

.github/workflows/ci-rbe.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ on:
1010
jobs:
1111
format:
1212
name: Format
13+
if: github.repository_owner == 'seleniumhq'
1314
uses: ./.github/workflows/bazel.yml
1415
with:
1516
name: Check format script run
@@ -19,6 +20,7 @@ jobs:
1920

2021
test:
2122
name: Test
23+
if: github.repository_owner == 'seleniumhq'
2224
uses: ./.github/workflows/bazel.yml
2325
with:
2426
# TODO: experiment with turning off caches

.github/workflows/ci-rust.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ jobs:
212212
name: "Release Binaries"
213213
runs-on: ubuntu-latest
214214
needs: [macos-stable, linux-stable, windows-stable, macos-debug, linux-debug, windows-debug]
215-
if: github.event_name != 'schedule'
215+
if: github.event_name != 'schedule' && github.repository_owner == 'seleniumhq'
216216
steps:
217217
- name: "Checkout selenium_manager_artifacts"
218218
uses: actions/checkout@v4

.github/workflows/label-commenter.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ permissions:
1111

1212
jobs:
1313
comment:
14+
if: github.repository_owner == 'seleniumhq'
1415
runs-on: ubuntu-20.04
1516
steps:
1617
- uses: actions/checkout@v4

.github/workflows/lock.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ permissions:
1212

1313
jobs:
1414
action:
15+
if: github.repository_owner == 'seleniumhq'
1516
runs-on: ubuntu-latest
1617
steps:
1718
- uses: dessant/lock-threads@v5

.github/workflows/mirror-selenium-releases.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77

88
jobs:
99
build:
10+
if: github.repository_owner == 'seleniumhq'
1011
runs-on: ubuntu-latest
1112
steps:
1213
- uses: actions/checkout@v4
@@ -24,7 +25,7 @@ jobs:
2425
export CHANGES=$(git status -s)
2526
if [ -n "$CHANGES" ]; then
2627
git config --local user.email "[email protected]"
27-
git config --local user.name "Selenium CI Bot"
28+
git config --local user.name "Selenium CI Bot"
2829
git add common/mirror/selenium
2930
git commit -m "Update mirror info (`date`)" -a
3031
echo "::set-output name=commit::true"

.github/workflows/nightly.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ on:
2121

2222
jobs:
2323
ruby:
24-
if: inputs.language == 'ruby' || github.event_name == 'schedule'
24+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'ruby' || github.event_name == 'schedule')
2525
name: Ruby
2626
uses: ./.github/workflows/bazel.yml
2727
strategy:
@@ -37,8 +37,9 @@ jobs:
3737
bazel run //rb:${{ matrix.gem }}-bump-nightly-version ${{ inputs.version }}
3838
bazel run //rb:${{ matrix.gem }}-release-nightly
3939
40+
4041
java:
41-
if: inputs.language == 'java' || github.event_name == 'schedule'
42+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'java' || github.event_name == 'schedule')
4243
name: Java
4344
uses: ./.github/workflows/bazel.yml
4445
with:
@@ -49,7 +50,7 @@ jobs:
4950
secrets: inherit
5051

5152
grid:
52-
if: inputs.language == 'grid' || github.event_name == 'schedule'
53+
if: (github.repository_owner == 'seleniumhq') && (inputs.language == 'grid' || github.event_name == 'schedule')
5354
name: Grid
5455
uses: ./.github/workflows/bazel.yml
5556
with:

.github/workflows/stale.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
stale:
13+
if: github.repository_owner == 'seleniumhq'
1314
permissions:
1415
issues: write # for actions/stale to close stale issues
1516
pull-requests: write # for actions/stale to close stale PRs

0 commit comments

Comments
 (0)