From cf7294644f40f3ae6ecb3a965eda6058d9336548 Mon Sep 17 00:00:00 2001 From: xiangtianyu Date: Mon, 20 May 2024 18:19:48 +0800 Subject: [PATCH] daily workflow that need token should check repo to avoid error notification --- .github/workflows/auto-update-otel-sdk.yml | 3 ++- .github/workflows/build-daily-no-build-cache.yml | 2 ++ .github/workflows/build-daily.yml | 2 ++ .github/workflows/codeql-daily.yml | 1 + .github/workflows/native-tests-daily.yml | 1 + .github/workflows/overhead-benchmark-daily.yml | 1 + .github/workflows/owasp-dependency-check-daily.yml | 1 + .github/workflows/release-update-cloudfoundry-index.yml | 1 + 8 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-update-otel-sdk.yml b/.github/workflows/auto-update-otel-sdk.yml index b01b8b0260b0..7bf61a013c67 100644 --- a/.github/workflows/auto-update-otel-sdk.yml +++ b/.github/workflows/auto-update-otel-sdk.yml @@ -9,6 +9,7 @@ on: jobs: check-versions: runs-on: ubuntu-latest + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' outputs: current-version: ${{ steps.check-versions.outputs.current-version }} latest-version: ${{ steps.check-versions.outputs.latest-version }} @@ -48,7 +49,7 @@ jobs: runs-on: ubuntu-latest if: | needs.check-versions.outputs.current-version != needs.check-versions.outputs.latest-version && - needs.check-versions.outputs.already-opened != 'true' + needs.check-versions.outputs.already-opened != 'true' && github.repository == 'open-telemetry/opentelemetry-java-instrumentation' needs: - check-versions steps: diff --git a/.github/workflows/build-daily-no-build-cache.yml b/.github/workflows/build-daily-no-build-cache.yml index 5517e0426ee2..d8c5c4307f4a 100644 --- a/.github/workflows/build-daily-no-build-cache.yml +++ b/.github/workflows/build-daily-no-build-cache.yml @@ -8,6 +8,7 @@ on: jobs: common: + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' uses: ./.github/workflows/build-common.yml with: no-build-cache: true @@ -15,6 +16,7 @@ jobs: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} test-latest-deps: + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' uses: ./.github/workflows/reusable-test-latest-deps.yml with: no-build-cache: true diff --git a/.github/workflows/build-daily.yml b/.github/workflows/build-daily.yml index c3e48c72cbdc..bc2bc5106ad9 100644 --- a/.github/workflows/build-daily.yml +++ b/.github/workflows/build-daily.yml @@ -8,11 +8,13 @@ on: jobs: common: + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' uses: ./.github/workflows/build-common.yml secrets: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} test-latest-deps: + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' uses: ./.github/workflows/reusable-test-latest-deps.yml secrets: GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }} diff --git a/.github/workflows/codeql-daily.yml b/.github/workflows/codeql-daily.yml index 19ec83149104..3d479e496111 100644 --- a/.github/workflows/codeql-daily.yml +++ b/.github/workflows/codeql-daily.yml @@ -16,6 +16,7 @@ jobs: actions: read # for github/codeql-action/init to get workflow details security-events: write # for github/codeql-action/analyze to upload SARIF results runs-on: ubuntu-latest + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 diff --git a/.github/workflows/native-tests-daily.yml b/.github/workflows/native-tests-daily.yml index 913a393cf948..57c77b7ec77a 100644 --- a/.github/workflows/native-tests-daily.yml +++ b/.github/workflows/native-tests-daily.yml @@ -8,6 +8,7 @@ on: jobs: graalvm-native-tests: + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' uses: ./.github/workflows/reusable-native-tests.yml workflow-notification: diff --git a/.github/workflows/overhead-benchmark-daily.yml b/.github/workflows/overhead-benchmark-daily.yml index 55457acd055e..6ba3e9867d9b 100644 --- a/.github/workflows/overhead-benchmark-daily.yml +++ b/.github/workflows/overhead-benchmark-daily.yml @@ -8,6 +8,7 @@ on: jobs: run-overhead-tests: runs-on: ubuntu-latest + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 diff --git a/.github/workflows/owasp-dependency-check-daily.yml b/.github/workflows/owasp-dependency-check-daily.yml index b722690be0d5..d35b406838f8 100644 --- a/.github/workflows/owasp-dependency-check-daily.yml +++ b/.github/workflows/owasp-dependency-check-daily.yml @@ -11,6 +11,7 @@ on: jobs: analyze: runs-on: ubuntu-latest + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 diff --git a/.github/workflows/release-update-cloudfoundry-index.yml b/.github/workflows/release-update-cloudfoundry-index.yml index ce05535ef7e9..92c157788c9e 100644 --- a/.github/workflows/release-update-cloudfoundry-index.yml +++ b/.github/workflows/release-update-cloudfoundry-index.yml @@ -16,6 +16,7 @@ jobs: update-cloudfoundry-index-yml: runs-on: ubuntu-latest + if: github.repository == 'open-telemetry/opentelemetry-java-instrumentation' steps: - uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6