diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index 5dc32836285..45aeec53d77 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -10,6 +10,7 @@ permissions: jobs: sdk-benchmark: + if: github.repository == 'open-telemetry/opentelemetry-java' permissions: contents: write # for git push to benchmarks branch name: Benchmark SDK diff --git a/.github/workflows/build-daily.yml b/.github/workflows/build-daily.yml index de864bb0a82..31c835d1a8f 100644 --- a/.github/workflows/build-daily.yml +++ b/.github/workflows/build-daily.yml @@ -11,9 +11,11 @@ permissions: jobs: link-check: + if: github.repository == 'open-telemetry/opentelemetry-java' uses: ./.github/workflows/reusable-link-check.yml publish-snapshots: + if: github.repository == 'open-telemetry/opentelemetry-java' environment: protected runs-on: ubuntu-24.04 steps: @@ -45,7 +47,7 @@ jobs: needs: - link-check - publish-snapshots - if: always() + if: always() && github.repository == 'open-telemetry/opentelemetry-java' uses: ./.github/workflows/reusable-workflow-notification.yml with: success: >- diff --git a/.github/workflows/build-tracecontext-testsuite.yml b/.github/workflows/build-tracecontext-testsuite.yml index f4d4f38a125..e3f2d8847c5 100644 --- a/.github/workflows/build-tracecontext-testsuite.yml +++ b/.github/workflows/build-tracecontext-testsuite.yml @@ -14,6 +14,7 @@ permissions: jobs: publish: + if: github.repository == 'open-telemetry/opentelemetry-java' permissions: contents: read packages: write diff --git a/.github/workflows/detect-api-changes.yml b/.github/workflows/detect-api-changes.yml index 7c7b3f34fca..e1ff5ddf1a2 100644 --- a/.github/workflows/detect-api-changes.yml +++ b/.github/workflows/detect-api-changes.yml @@ -15,6 +15,7 @@ permissions: {} jobs: detect-api-changes: name: Detect API surface area changes + if: github.repository == 'open-telemetry/opentelemetry-java' runs-on: ubuntu-latest steps: - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 diff --git a/.github/workflows/fossa.yml b/.github/workflows/fossa.yml index 6b1514d43b8..a88b0e36906 100644 --- a/.github/workflows/fossa.yml +++ b/.github/workflows/fossa.yml @@ -10,6 +10,7 @@ permissions: jobs: fossa: + if: github.repository == 'open-telemetry/opentelemetry-java' runs-on: ubuntu-latest steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 diff --git a/.github/workflows/javadoc-crawler.yml b/.github/workflows/javadoc-crawler.yml index 783dc09a26e..e0fc2b27f9a 100644 --- a/.github/workflows/javadoc-crawler.yml +++ b/.github/workflows/javadoc-crawler.yml @@ -10,6 +10,7 @@ permissions: jobs: crawl: + if: github.repository == 'open-telemetry/opentelemetry-java' runs-on: ubuntu-latest steps: - uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 diff --git a/.github/workflows/ossf-scorecard.yml b/.github/workflows/ossf-scorecard.yml index d8b52eb0246..e7fc055aa5c 100644 --- a/.github/workflows/ossf-scorecard.yml +++ b/.github/workflows/ossf-scorecard.yml @@ -13,6 +13,7 @@ permissions: jobs: analysis: + if: github.repository == 'open-telemetry/opentelemetry-java' runs-on: ubuntu-latest permissions: # Needed for Code scanning upload diff --git a/.github/workflows/pr-review-dashboard.yml b/.github/workflows/pr-review-dashboard.yml index c5c6d647377..0274c79a802 100644 --- a/.github/workflows/pr-review-dashboard.yml +++ b/.github/workflows/pr-review-dashboard.yml @@ -11,6 +11,7 @@ permissions: jobs: update-dashboard: + if: github.repository == 'open-telemetry/opentelemetry-java' permissions: issues: write environment: protected diff --git a/.github/workflows/sonatype-guide-dependency-audit-daily.yml b/.github/workflows/sonatype-guide-dependency-audit-daily.yml index 7c29d4ee342..8982b935fb5 100644 --- a/.github/workflows/sonatype-guide-dependency-audit-daily.yml +++ b/.github/workflows/sonatype-guide-dependency-audit-daily.yml @@ -12,6 +12,7 @@ permissions: jobs: analyze: + if: github.repository == 'open-telemetry/opentelemetry-java' environment: protected runs-on: ubuntu-latest steps: @@ -46,7 +47,7 @@ jobs: issues: write needs: - analyze - if: always() + if: always() && github.repository == 'open-telemetry/opentelemetry-java' uses: ./.github/workflows/reusable-workflow-notification.yml with: success: ${{ needs.analyze.result == 'success' }} diff --git a/.github/workflows/survey-on-merged-pr.yml b/.github/workflows/survey-on-merged-pr.yml index 04b8d3f1b79..bfaba32206d 100644 --- a/.github/workflows/survey-on-merged-pr.yml +++ b/.github/workflows/survey-on-merged-pr.yml @@ -20,7 +20,7 @@ jobs: comment-on-pr: name: Add survey to PR if author is not a member runs-on: ubuntu-latest - if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true && github.repository == 'open-telemetry/opentelemetry-java' steps: - uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0 id: otelbot-token