chore(deps): absorb 2026-08 dependabot GitHub Actions updates #57
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: plugins-selinux | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths: | |
| - '.github/workflows/plugins-selinux.yml' | |
| - 'selinux/**' | |
| push: | |
| branches: | |
| - develop | |
| - master | |
| paths: | |
| - '.github/workflows/plugins-selinux.yml' | |
| - 'selinux/**' | |
| jobs: | |
| dependency-scan: | |
| uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main | |
| get-environment: | |
| needs: [dependency-scan] | |
| uses: ./.github/workflows/get-environment.yml | |
| with: | |
| version_file: selinux/packaging/centreon-plugins-selinux.yaml | |
| package: | |
| needs: [get-environment] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| needs.get-environment.outputs.stability != 'stable' | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| matrix: | |
| include: | |
| - package_extension: rpm | |
| image: packaging-plugins-alma8 | |
| distrib: el8 | |
| - package_extension: rpm | |
| image: packaging-plugins-alma9 | |
| distrib: el9 | |
| - package_extension: rpm | |
| image: packaging-plugins-alma10 | |
| distrib: el10 | |
| container: | |
| image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }} | |
| credentials: | |
| username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} | |
| password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} | |
| name: package ${{ matrix.distrib }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Generate selinux binary | |
| env: | |
| VERSION: ${{ needs.get-environment.outputs.version }} | |
| run: | | |
| cd selinux/src | |
| sed -i "s/@VERSION@/$VERSION/g" centreon-plugins.te | |
| make -f /usr/share/selinux/devel/Makefile | |
| shell: bash | |
| - name: Package | |
| uses: ./.github/actions/package-nfpm | |
| with: | |
| nfpm_file_pattern: "selinux/packaging/centreon-plugins-selinux.yaml" | |
| distrib: ${{ matrix.distrib }} | |
| package_extension: ${{ matrix.package_extension }} | |
| version: ${{ needs.get-environment.outputs.version }} | |
| release: ${{ needs.get-environment.outputs.release }} | |
| commit_hash: ${{ github.sha }} | |
| cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }} | |
| rpm_gpg_key: ${{ secrets.RPM_GPG_SIGNING_KEY }} | |
| rpm_gpg_signing_key_id: ${{ secrets.RPM_GPG_SIGNING_KEY_ID }} | |
| rpm_gpg_signing_passphrase: ${{ secrets.RPM_GPG_SIGNING_PASSPHRASE }} | |
| stability: ${{ needs.get-environment.outputs.stability }} | |
| deliver-packages: | |
| needs: [get-environment, package] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| (contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) || ( needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch')) && | |
| ! cancelled() && | |
| ! contains(needs.*.result, 'failure') && | |
| ! contains(needs.*.result, 'cancelled') | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - distrib: el8 | |
| package_extension: rpm | |
| - distrib: el9 | |
| package_extension: rpm | |
| - distrib: el10 | |
| package_extension: rpm | |
| name: deliver ${{ matrix.distrib }} | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Delivery | |
| uses: ./.github/actions/package-delivery | |
| with: | |
| module_name: plugins-selinux | |
| distrib: ${{ matrix.distrib }} | |
| cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }} | |
| stability: ${{ needs.get-environment.outputs.stability }} | |
| release_type: ${{ needs.get-environment.outputs.release_type }} | |
| artifactory_token: ${{ secrets.ARTIFACTORY_ACCESS_TOKEN }} | |
| deliver-packages-pulp: | |
| needs: [get-environment, package] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| (contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) || ( needs.get-environment.outputs.stability == 'stable' && github.event_name != 'workflow_dispatch')) && | |
| ! cancelled() && | |
| ! contains(needs.*.result, 'failure') && | |
| ! contains(needs.*.result, 'cancelled') | |
| runs-on: centreon-ubuntu-22.04 | |
| continue-on-error: true | |
| permissions: | |
| contents: read | |
| id-token: write | |
| pull-requests: read | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - distrib: el8 | |
| package_extension: rpm | |
| - distrib: el9 | |
| package_extension: rpm | |
| - distrib: el10 | |
| package_extension: rpm | |
| name: deliver ${{ matrix.distrib }} on pulp | |
| steps: | |
| - name: Checkout sources | |
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| - name: Get release type | |
| if: ${{ needs.get-environment.outputs.stability == 'stable' }} | |
| id: get_release_type | |
| uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 | |
| with: | |
| script: | | |
| const commitSha = context.sha; | |
| const pulls = await github.rest.pulls.list({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| sort: 'updated', | |
| direction: 'desc', | |
| state: 'closed', | |
| per_page: 100 | |
| }); | |
| core.startGroup(`Checking pull request linked to commit ${commitSha}`); | |
| const pr = pulls.data.find(p => { | |
| console.log(`Checking pull request ${p.number}("${p.title}") with merge commit ${p.merge_commit_sha}`); | |
| return p.merge_commit_sha === commitSha; | |
| }); | |
| core.endGroup(); | |
| if (!pr) { | |
| core.error(`No pull request found for merge commit ${commitSha}`); | |
| core.setOutput('release_type', ''); | |
| return; | |
| } | |
| const prHeadRef = pr?.head?.ref || 'unknown'; | |
| let releaseType = ''; | |
| switch (true) { | |
| case /^release.+/.test(prHeadRef): | |
| releaseType = 'release'; | |
| break; | |
| case /^hotfix.+/.test(prHeadRef): | |
| releaseType = 'hotfix'; | |
| break; | |
| default: | |
| core.error(`No packages are promoted because push of branch ${prHeadRef} is not related to a hotfix/release pull request.`); | |
| core.setOutput('release_type', ''); | |
| return; | |
| } | |
| console.log(`Release type: ${releaseType}`); | |
| core.setOutput('release_type', releaseType); | |
| - name: Deliver packages on Pulp | |
| if: ${{ contains(fromJson('["testing", "unstable"]'), needs.get-environment.outputs.stability) }} | |
| id: deliver_pulp | |
| continue-on-error: true | |
| uses: ./.github/actions/package-delivery-pulp | |
| with: | |
| module_name: plugins-selinux | |
| repository_name: plugins | |
| distrib: ${{ matrix.distrib }} | |
| version: "" | |
| cache_key: ${{ github.sha }}-${{ github.run_id }}-${{ matrix.package_extension }}-${{ matrix.distrib }} | |
| stability: ${{ needs.get-environment.outputs.stability }} | |
| release_type: ${{ needs.get-environment.outputs.release_type }} | |
| is_cloud: "false" | |
| pulp_url: ${{ vars.PULP_API_URL }} | |
| pulp_content_url: ${{ vars.PULP_CONTENT_URL }} | |
| audience: ${{ vars.PULP_OIDC_AUDIENCE }} | |
| - name: Promote packages on Pulp | |
| if: ${{ needs.get-environment.outputs.stability == 'stable' && steps.get_release_type.outputs.release_type != '' }} | |
| id: promote_pulp | |
| continue-on-error: true | |
| uses: ./.github/actions/promote-to-stable-pulp | |
| with: | |
| module_name: plugins-selinux | |
| repository_name: plugins | |
| distrib: ${{ matrix.distrib }} | |
| major_version: "" | |
| stability: stable | |
| release_type: ${{ steps.get_release_type.outputs.release_type }} | |
| is_cloud: "false" | |
| pulp_url: ${{ vars.PULP_API_URL }} | |
| pulp_content_url: ${{ vars.PULP_CONTENT_URL }} | |
| audience: ${{ vars.PULP_OIDC_AUDIENCE }} | |
| - name: Warn if the Pulp delivery failed | |
| if: steps.deliver_pulp.outcome == 'failure' || steps.promote_pulp.outcome == 'failure' | |
| shell: bash | |
| run: | | |
| echo "::warning::Pulp delivery/promotion failed (non-blocking during the Artifactory-to-Pulp migration; Artifactory delivery remains authoritative). See the 'Deliver packages on Pulp' / 'Promote packages on Pulp' step." | |
| set-skip-label: | |
| needs: [get-environment, deliver-packages] | |
| if: | | |
| needs.get-environment.outputs.skip_workflow == 'false' && | |
| ! cancelled() && | |
| ! contains(needs.*.result, 'failure') && | |
| ! contains(needs.*.result, 'cancelled') | |
| uses: ./.github/workflows/set-pull-request-skip-label.yml |