Skip to content

Commit 406ee72

Browse files
committed
ci: skip cloud tests for external pull requests
1 parent 8742ad9 commit 406ee72

3 files changed

Lines changed: 9 additions & 0 deletions

File tree

.github/workflows/cloud-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ permissions:
2424
jobs:
2525
example-tests:
2626
name: example-tests (${{ matrix.python-version }})
27+
# 1. Run for non-PR events, such as scheduled runs and manual invocations
28+
# 2. For PRs, run only same-repo branches from non-Dependabot actors; forked PRs or Dependabot should not access secrets.
29+
if: github.event_name != 'pull_request' || (github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
2730
runs-on: ubuntu-latest
2831
permissions:
2932
contents: read

.github/workflows/conformance-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ permissions:
3939
jobs:
4040
discover_suites:
4141
name: discover conformance suites
42+
# 1. Run for non-PR events, such as scheduled runs and manual invocations
43+
# 2. For PRs, run only same-repo branches from non-Dependabot actors; forked PRs or Dependabot should not access secrets.
44+
if: github.event_name != 'pull_request' || (github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
4245
runs-on: ubuntu-latest
4346
outputs:
4447
suites: ${{ steps.discover.outputs.suites }}

.github/workflows/opentelemetry-conformance-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ permissions: {}
5252

5353
jobs:
5454
opentelemetry:
55+
# 1. Run for non-PR events, such as scheduled runs and manual invocations
56+
# 2. For PRs, run only same-repo branches from non-Dependabot actors; forked PRs or Dependabot should not access secrets.
57+
if: github.event_name != 'pull_request' || (github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)
5558
permissions:
5659
actions: write
5760
contents: read

0 commit comments

Comments
 (0)