diff --git a/.github/workflows/centreon-collect.yml b/.github/workflows/centreon-collect.yml index 32a27a4f0b..54127ba309 100644 --- a/.github/workflows/centreon-collect.yml +++ b/.github/workflows/centreon-collect.yml @@ -301,13 +301,15 @@ jobs: jira_base_url: ${{ secrets.JIRA_BASE_URL }} jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }} jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }} + robot-test: needs: [get-environment, package] if: | needs.get-environment.outputs.is_nightly == 'true' && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect-collect' strategy: fail-fast: false @@ -374,6 +376,7 @@ jobs: jira_base_url: ${{ secrets.JIRA_BASE_URL }} jira_user_email: ${{ secrets.XRAY_JIRA_USER_EMAIL }} jira_api_token: ${{ secrets.XRAY_JIRA_TOKEN }} + deliver-sources: runs-on: [self-hosted, common] needs: [get-environment, package] @@ -382,7 +385,8 @@ jobs: contains(fromJson('["stable"]'), needs.get-environment.outputs.stability) && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect-collect' steps: - name: Checkout sources @@ -405,7 +409,9 @@ jobs: contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' + needs: [get-environment, robot-test] runs-on: [self-hosted, common] strategy: @@ -452,7 +458,9 @@ jobs: contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' + needs: [get-environment, robot-test] runs-on: [self-hosted, common] strategy: @@ -485,7 +493,8 @@ jobs: if: | needs.get-environment.outputs.is_nightly == 'true' && github.run_attempt == 1 && failure() && - startsWith(github.ref_name, 'dev') + startsWith(github.ref_name, 'dev') && + github.repository == 'centreon/centreon-collect' uses: ./.github/actions/create-jira-ticket with: jira_base_url: ${{ secrets.JIRA_BASE_URL }} @@ -500,7 +509,9 @@ jobs: (contains(fromJson('["stable", "testing"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch') && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' + runs-on: [self-hosted, common] strategy: matrix: diff --git a/.github/workflows/centreon-common.yml b/.github/workflows/centreon-common.yml index b9b0932d9c..cc55407786 100644 --- a/.github/workflows/centreon-common.yml +++ b/.github/workflows/centreon-common.yml @@ -93,7 +93,7 @@ jobs: deliver-rpm: runs-on: [self-hosted, common] needs: [get-environment, package] - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} strategy: matrix: @@ -118,7 +118,7 @@ jobs: deliver-deb: runs-on: [self-hosted, common] needs: [get-environment, package] - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} strategy: matrix: @@ -146,7 +146,9 @@ jobs: (contains(fromJson('["stable", "testing"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch') && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' + runs-on: [self-hosted, common] strategy: matrix: diff --git a/.github/workflows/docker-builder.yml b/.github/workflows/docker-builder.yml index 801df40a60..068bad3034 100644 --- a/.github/workflows/docker-builder.yml +++ b/.github/workflows/docker-builder.yml @@ -18,6 +18,7 @@ on: jobs: get-environment: + if: github.repository == 'centreon/centreon-collect' uses: ./.github/workflows/get-environment.yml with: version_file: CMakeLists.txt diff --git a/.github/workflows/docker-gorgone-testing.yml b/.github/workflows/docker-gorgone-testing.yml index 7ded1b2364..67f95c0db6 100644 --- a/.github/workflows/docker-gorgone-testing.yml +++ b/.github/workflows/docker-gorgone-testing.yml @@ -20,6 +20,7 @@ on: jobs: get-environment: + if: github.repository == 'centreon/centreon-collect' uses: ./.github/workflows/get-environment.yml dockerize: diff --git a/.github/workflows/gorgone.yml b/.github/workflows/gorgone.yml index 703daac522..944aef861f 100644 --- a/.github/workflows/gorgone.yml +++ b/.github/workflows/gorgone.yml @@ -175,6 +175,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} robot-test-gorgone: + if: github.repository == 'centreon/centreon-collect' needs: [get-environment, package] strategy: @@ -287,7 +288,7 @@ jobs: deliver-sources: runs-on: [self-hosted, common] needs: [get-environment, package] - if: ${{ contains(fromJson('["stable"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch' }} + if: ${{ contains(fromJson('["stable"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch' && github.repository == 'centreon/centreon-collect' }} steps: - name: Checkout sources @@ -306,7 +307,7 @@ jobs: deliver-rpm: runs-on: [self-hosted, common] needs: [get-environment, package] - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} strategy: matrix: @@ -331,7 +332,7 @@ jobs: deliver-deb: runs-on: [self-hosted, common] needs: [get-environment, package] - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} strategy: matrix: @@ -359,7 +360,9 @@ jobs: (contains(fromJson('["stable", "testing"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch') && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' + runs-on: [self-hosted, common] strategy: matrix: diff --git a/.github/workflows/libzmq.yml b/.github/workflows/libzmq.yml index a8bc1e1089..7ce3fc7169 100644 --- a/.github/workflows/libzmq.yml +++ b/.github/workflows/libzmq.yml @@ -138,7 +138,7 @@ jobs: key: ${{ github.run_id }}-${{ github.sha }}-deb-libzmq-${{ matrix.distrib }}-${{ matrix.arch }} deliver-rpm: - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} needs: [get-environment, package-rpm] runs-on: [self-hosted, common] strategy: @@ -168,7 +168,7 @@ jobs: is_cloud: ${{ needs.get-environment.outputs.is_cloud }} deliver-deb: - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} needs: [get-environment, package-deb] runs-on: [self-hosted, common] strategy: @@ -203,7 +203,8 @@ jobs: (contains(fromJson('["stable", "testing"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch') && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' runs-on: [self-hosted, common] strategy: matrix: diff --git a/.github/workflows/lua-curl.yml b/.github/workflows/lua-curl.yml index c10022d8f6..e1a1f52438 100644 --- a/.github/workflows/lua-curl.yml +++ b/.github/workflows/lua-curl.yml @@ -129,7 +129,7 @@ jobs: stability: ${{ needs.get-environment.outputs.stability }} deliver-rpm: - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} needs: [get-environment, package] runs-on: ubuntu-24.04 strategy: @@ -158,7 +158,7 @@ jobs: is_cloud: ${{ needs.get-environment.outputs.is_cloud }} deliver-deb: - if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} + if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) && github.repository == 'centreon/centreon-collect' }} needs: [get-environment, package] runs-on: ubuntu-24.04 strategy: @@ -192,7 +192,8 @@ jobs: (contains(fromJson('["stable", "testing"]'), needs.get-environment.outputs.stability) && github.event_name != 'workflow_dispatch') && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' runs-on: [self-hosted, common] strategy: matrix: diff --git a/.github/workflows/rebase-master.yml b/.github/workflows/rebase-master.yml index a3a324e7c2..57a76f8eeb 100644 --- a/.github/workflows/rebase-master.yml +++ b/.github/workflows/rebase-master.yml @@ -13,7 +13,7 @@ jobs: main: name: Sync Stable Branches runs-on: ubuntu-24.04 - if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true && github.repository == 'centreon/centreon-collect' steps: - name: git checkout uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 diff --git a/.github/workflows/rebase-version.yml b/.github/workflows/rebase-version.yml index 915dcd8fb1..8e812f122d 100644 --- a/.github/workflows/rebase-version.yml +++ b/.github/workflows/rebase-version.yml @@ -13,7 +13,7 @@ jobs: main: name: Sync Stable Branches runs-on: ubuntu-24.04 - if: github.event.pull_request.merged == true + if: github.event.pull_request.merged == true && github.repository == 'centreon/centreon-collect' steps: - name: git checkout uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 diff --git a/.github/workflows/release-trigger-builds.yml b/.github/workflows/release-trigger-builds.yml index fd208a4f75..62272f1a6c 100644 --- a/.github/workflows/release-trigger-builds.yml +++ b/.github/workflows/release-trigger-builds.yml @@ -17,6 +17,7 @@ on: jobs: release-trigger-builds: + if: github.repository == 'centreon/centreon-collect' runs-on: ubuntu-24.04 steps: - uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index af0d2a151e..74b462ec14 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ on: jobs: release: - if: ${{ github.event.pull_request.merged == true }} + if: ${{ github.event.pull_request.merged == true && github.repository == 'centreon/centreon-collect' }} runs-on: ubuntu-24.04 steps: - name: Check base_ref diff --git a/.github/workflows/windows-agent.yml b/.github/workflows/windows-agent.yml index 89edf270ec..a9c009b642 100644 --- a/.github/workflows/windows-agent.yml +++ b/.github/workflows/windows-agent.yml @@ -157,7 +157,8 @@ jobs: contains(fromJson('["stable"]'), needs.get-environment.outputs.stability) && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled')) + ! contains(needs.*.result, 'cancelled')) && + github.repository == 'centreon/centreon-collect' uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: packages-centreon-monitoring-agent-windows @@ -170,7 +171,8 @@ jobs: contains(fromJson('["unstable", "testing"]'), needs.get-environment.outputs.stability) && ! cancelled() && ! contains(needs.*.result, 'failure') && - ! contains(needs.*.result, 'cancelled') + ! contains(needs.*.result, 'cancelled') && + github.repository == 'centreon/centreon-collect' run: | Write-Host "[DEBUG] deliver to testing - Major version: ${{ needs.get-environment.outputs.major_version }}" Write-Host "[DEBUG] deliver to testing - Minor version: ${{ needs.get-environment.outputs.minor_version }}" @@ -190,7 +192,7 @@ jobs: - name: Promote testing to stable if: | - needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch' && ! cancelled() + needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch' && ! cancelled() && github.repository == 'centreon/centreon-collect' run: | Write-Host "[DEBUG] promote to stable - Major version: ${{ needs.get-environment.outputs.major_version }}" Write-Host "[DEBUG] promote to stable - Minor version: ${{ needs.get-environment.outputs.minor_version }}"