diff --git a/.github/workflows/get-version.yml b/.github/workflows/get-version.yml index 0af30a40647..0950652671b 100644 --- a/.github/workflows/get-version.yml +++ b/.github/workflows/get-version.yml @@ -72,6 +72,19 @@ jobs: echo "latest_major_version=$MAJOR" >> $GITHUB_OUTPUT shell: bash + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + with: + ref: develop + path: centreon-collect-develop + sparse-checkout: .version + + - name: store latest major version + id: latest_major_version + run: | + . centreon-collect-develop/.version + echo "latest_major_version=$MAJOR" >> $GITHUB_OUTPUT + shell: bash + - name: install gh cli on self-hosted runner run: | if ! command -v gh &> /dev/null; then diff --git a/.github/workflows/gorgone.yml b/.github/workflows/gorgone.yml index 1c94785106c..0a4f07e8761 100644 --- a/.github/workflows/gorgone.yml +++ b/.github/workflows/gorgone.yml @@ -234,7 +234,7 @@ jobs: - name: Upload gorgone and robot debug artifacts if: failure() - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: gorgone-debug-${{ matrix.distrib }} path: | diff --git a/.github/workflows/package-collect.yml b/.github/workflows/package-collect.yml index 1fad6c86cb5..91940d66bdc 100644 --- a/.github/workflows/package-collect.yml +++ b/.github/workflows/package-collect.yml @@ -211,7 +211,7 @@ jobs: # set condition to true if artifacts are needed - if: inputs.packages_in_artifact == true name: Upload package artifacts - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: packages-${{ inputs.distrib }}-${{ inputs.arch }} path: ./*.${{ inputs.package_extension}} diff --git a/.github/workflows/robot-test.yml b/.github/workflows/robot-test.yml index 05389b6991a..1e925935cf2 100644 --- a/.github/workflows/robot-test.yml +++ b/.github/workflows/robot-test.yml @@ -182,7 +182,7 @@ jobs: - name: Upload Test Results if: ${{ failure() }} - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: reports-${{inputs.test_group_name}}-${{ steps.feature-path.outputs.feature_name_with_dash }} path: reports @@ -204,7 +204,7 @@ jobs: merge-multiple: true - name: Upload the regrouped artifact - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: reports-${{inputs.test_group_name}} path: reports/ diff --git a/.github/workflows/windows-agent-robot-test.yml b/.github/workflows/windows-agent-robot-test.yml index 1217b0eced1..1019fa67b0d 100644 --- a/.github/workflows/windows-agent-robot-test.yml +++ b/.github/workflows/windows-agent-robot-test.yml @@ -50,7 +50,6 @@ jobs: - name: Checkout sources uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - - name: distrib availables run: wsl --list --online @@ -123,7 +122,7 @@ jobs: - name: Upload Test Results if: ${{ failure() }} - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: reports-cma-windows path: reports diff --git a/.github/workflows/windows-agent.yml b/.github/workflows/windows-agent.yml index b8931d39410..088844113f6 100644 --- a/.github/workflows/windows-agent.yml +++ b/.github/workflows/windows-agent.yml @@ -75,8 +75,13 @@ jobs: - name: Upload package artifacts if: | - inputs.installer_in_artifact == true - uses: actions/upload-artifact@0b2256b8c012f0828dc542b3febcab082c67f72b # v4.3.4 + inputs.installer_in_artifact == true || + (github.event_name != 'workflow_dispatch' && + contains(fromJson('["stable"]'), needs.get-version.outputs.stability) && + ! cancelled() && + ! contains(needs.*.result, 'failure') && + ! contains(needs.*.result, 'cancelled')) + uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: packages-centreon-monitoring-agent-windows path: agent\installer\centreon-monitoring-agent.exe