Skip to content

chore(deps): absorb 2026-06 dependabot GitHub Actions updates #866

chore(deps): absorb 2026-06 dependabot GitHub Actions updates

chore(deps): absorb 2026-06 dependabot GitHub Actions updates #866

name: perl-cpan-libraries
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
workflow_dispatch:
pull_request:
paths:
- ".github/workflows/perl-cpan-libraries.yml"
- ".github/packaging/cpan-libraries.json"
push:
branches:
- develop
- master
paths:
- ".github/workflows/perl-cpan-libraries.yml"
- ".github/packaging/cpan-libraries.json"
jobs:
dependency-scan:
uses: centreon/security-tools/.github/workflows/dependency-analysis.yml@main
get-environment:
needs: [dependency-scan]
uses: ./.github/workflows/get-environment.yml
check-official-repos:
needs: [get-environment]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- distrib: el8
image: almalinux:8
- distrib: el9
image: almalinux:9
- distrib: el10
image: almalinux:10
- distrib: bullseye
image: debian:bullseye
- distrib: bookworm
image: debian:bookworm
- distrib: trixie
image: debian:trixie
- distrib: jammy
image: ubuntu:jammy
- distrib: noble
image: ubuntu:noble
container:
image: ${{ matrix.image }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Setup RPM environment
if: ${{ contains(fromJson('["el8","el9","el10"]'), matrix.distrib) }}
env:
DISTRIB: ${{ matrix.distrib }}
run: |
dnf install -y 'dnf-command(config-manager)' epel-release
if [ "$DISTRIB" = "el8" ]; then
dnf config-manager --set-enabled powertools
else
dnf config-manager --set-enabled crb
fi
dnf install -y python3 perl-App-cpanminus
shell: bash
- name: Setup DEB environment
if: ${{ !contains(fromJson('["el8","el9","el10"]'), matrix.distrib) }}
run: |
apt-get update -qq
apt-get install -y python3 cpanminus
shell: bash
- name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
with:
distrib: ${{ matrix.distrib }}
- name: Check official repos for ${{ matrix.distrib }}
env:
DISTRIB: ${{ matrix.distrib }}
PKG_DISTRIB_SEPARATOR: ${{ steps.parse-distrib.outputs.package_distrib_separator }}
PKG_DISTRIB_NAME: ${{ steps.parse-distrib.outputs.package_distrib_name }}
DISTRIB_FAMILY: ${{ steps.parse-distrib.outputs.distrib_family }}
run: |
python3 .github/scripts/perl-cpan-libraries/check-official-repos.py \
--distrib "$DISTRIB" \
--separator "$PKG_DISTRIB_SEPARATOR" \
--suffix "$PKG_DISTRIB_NAME" \
--family "$DISTRIB_FAMILY" \
--output "official-repos/partial-matrix-${DISTRIB}.json" \
.github/packaging/cpan-libraries.json
shell: bash
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: partial-matrix-${{ matrix.distrib }}
path: official-repos/partial-matrix-${{ matrix.distrib }}.json
retention-days: 1
generate-matrices:
needs: [get-environment, check-official-repos]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
outputs:
matrix_rpm: ${{ steps.generate.outputs.matrix_rpm }}
matrix_deb: ${{ steps.generate.outputs.matrix_deb }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
pattern: partial-matrix-*
path: official-repos/
merge-multiple: true
- name: Merge partial matrices into RPM and DEB matrices
id: generate
env:
STABILITY: ${{ needs.get-environment.outputs.stability }}
run: |
python3 .github/scripts/perl-cpan-libraries/generate-matrices.py \
--partial-matrices-dir official-repos \
--artifactory-url https://packages.centreon.com \
--stability "$STABILITY" \
.github/packaging/cpan-libraries.json
shell: bash
- name: Delete partial matrix artifacts
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: partial-matrix-*
failOnError: false
package-rpm:
needs: [get-environment, generate-matrices]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
fail-fast: false
max-parallel: 50
matrix: ${{ fromJson(needs.generate-matrices.outputs.matrix_rpm) }}
name: Package ${{ matrix.distrib }} ${{ matrix.name }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Pull packaging image from ghcr.io
env:
GHCR_IMAGE: ghcr.io/${{ github.repository }}/${{ matrix.image }}
run: docker pull "${GHCR_IMAGE}"
shell: bash
- if: ${{ matrix.spec_file == '' }}
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ matrix.image }}
VERSION: ${{ matrix.version || matrix.cpan_version }}
RPM_DEPENDENCIES: ${{ matrix.rpm_dependencies }}
RPM_PROVIDES: ${{ matrix.rpm_provides }}
NO_AUTO_DEPENDS: ${{ matrix.no-auto-depends }}
PREINSTALL_CPANLIBS: ${{ matrix.preinstall_cpanlibs }}
PREINSTALL_PACKAGES: ${{ matrix.preinstall_packages }}
PKG_NAME: ${{ matrix.name }}
PKG_EXT: ${{ matrix.package_extension }}
DISTRIB: ${{ matrix.distrib }}
REVISION: ${{ matrix.revision }}
run: |
docker run --rm \
-v "$(pwd):/work" \
--workdir /work \
-e VERSION -e RPM_DEPENDENCIES -e RPM_PROVIDES \
-e NO_AUTO_DEPENDS -e PREINSTALL_CPANLIBS -e PREINSTALL_PACKAGES \
-e PKG_NAME -e PKG_EXT -e DISTRIB -e REVISION \
"${DOCKER_IMAGE}" \
bash .github/scripts/perl-cpan-libraries/package-cpan-rpm.sh
shell: bash
- if: ${{ matrix.spec_file != '' }}
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ matrix.image }}
SPEC_FILE: ${{ matrix.spec_file }}
run: |
docker run --rm \
-v "$(pwd):/work" \
--workdir /work \
-e SPEC_FILE \
"${DOCKER_IMAGE}" \
bash -c '
mkdir -p ~/rpmbuild/{BUILD,BUILDROOT,RPMS,SOURCES,SPECS,SRPMS}
rpmbuild --undefine=_disable_source_fetch -ba "$SPEC_FILE"
cp -r ~/rpmbuild/RPMS/noarch/*.rpm /work/
'
shell: bash
- name: Replace '::' with - in the feature path
id: package-name
env:
PKG_NAME: ${{ matrix.name }}
run: |
name_with_dash="${PKG_NAME//::/-}"
echo "name_with_dash=$name_with_dash" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ steps.package-name.outputs.name_with_dash }}
path: ./*.${{ matrix.package_extension }}
retention-days: 1
merge-package-rpm-artifacts:
needs: [get-environment, package-rpm]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [el8, el9, el10]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: packages-rpm-${{ matrix.distrib }}
pattern: packages-rpm-${{ matrix.distrib }}-*
delete-merged: false # cannot be set to true due to random fails: Failed to DeleteArtifact: Unable to make request: ECONNRESET
retention-days: 1
- name: Delete merged artifacts
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: packages-rpm-${{ matrix.distrib }}-*
failOnError: false
sign-rpm:
needs: [get-environment, merge-package-rpm-artifacts]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
max-parallel: 1
matrix:
distrib: [el8, el9, el10]
name: sign rpm ${{ matrix.distrib }}
container:
image: docker.centreon.com/centreon-private/rpm-signing
options: -t
credentials:
username: ${{ secrets.HARBOR_CENTREON_PRIVATE_USERNAME }}
password: ${{ secrets.HARBOR_CENTREON_PRIVATE_TOKEN }}
steps:
- run: apt-get install -y zstd
shell: bash
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: packages-rpm-${{ matrix.distrib }}
path: ./
- run: echo "HOME=/root" >> $GITHUB_ENV
shell: bash
- run: rpmsign --addsign ./*.rpm
shell: bash
- uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ./*.rpm
key: ${{ github.sha }}-${{ github.run_id }}-rpm-${{ matrix.distrib }}
package-deb:
needs: [get-environment, generate-matrices]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ${{ matrix.runner_name }}
strategy:
fail-fast: false
max-parallel: 50
matrix: ${{ fromJson(needs.generate-matrices.outputs.matrix_deb) }}
name: package ${{ matrix.distrib }} ${{ matrix.arch }} ${{ matrix.name }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Login to GitHub Container Registry
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ github.token }}
- name: Pull packaging image from ghcr.io
env:
GHCR_IMAGE: ghcr.io/${{ github.repository }}/${{ matrix.image }}
run: docker pull "${GHCR_IMAGE}"
shell: bash
- name: Parse distrib name
id: parse-distrib
uses: ./.github/actions/parse-distrib
with:
distrib: ${{ matrix.distrib }}
- if: ${{ matrix.use_dh_make_perl == 'false' }}
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ matrix.image }}
VERSION: ${{ matrix.version || matrix.cpan_version }}
DEB_DEPENDENCIES: ${{ matrix.deb_dependencies }}
DEB_PROVIDES: ${{ matrix.deb_provides }}
NO_AUTO_DEPENDS: ${{ matrix.no-auto-depends }}
PREINSTALL_CPANLIBS: ${{ matrix.preinstall_cpanlibs }}
PREINSTALL_PACKAGES: ${{ matrix.preinstall_packages }}
PKG_NAME: ${{ matrix.name }}
PKG_EXT: ${{ matrix.package_extension }}
DISTRIB: ${{ matrix.distrib }}
REVISION: ${{ matrix.revision }}
DISTRIB_SEPARATOR: ${{ steps.parse-distrib.outputs.package_distrib_separator }}
DISTRIB_SUFFIX: ${{ steps.parse-distrib.outputs.package_distrib_name }}
run: |
docker run --rm \
-v "$(pwd):/work" \
--workdir /work \
-e VERSION -e DEB_DEPENDENCIES -e DEB_PROVIDES \
-e NO_AUTO_DEPENDS -e PREINSTALL_CPANLIBS -e PREINSTALL_PACKAGES \
-e PKG_NAME -e PKG_EXT -e DISTRIB -e REVISION \
-e DISTRIB_SEPARATOR -e DISTRIB_SUFFIX \
"${DOCKER_IMAGE}" \
bash .github/scripts/perl-cpan-libraries/package-cpan-deb-fpm.sh
shell: bash
- if: ${{ matrix.use_dh_make_perl == 'true' }}
env:
DOCKER_IMAGE: ghcr.io/${{ github.repository }}/${{ matrix.image }}
VERSION: ${{ matrix.version || matrix.cpan_version }}
PREINSTALL_CPANLIBS: ${{ matrix.preinstall_cpanlibs }}
PREINSTALL_PACKAGES: ${{ matrix.preinstall_packages }}
PKG_NAME: ${{ matrix.name }}
DISTRIB: ${{ matrix.distrib }}
REVISION: ${{ matrix.revision }}
DISTRIB_SEPARATOR: ${{ steps.parse-distrib.outputs.package_distrib_separator }}
DISTRIB_SUFFIX: ${{ steps.parse-distrib.outputs.package_distrib_name }}
run: |
docker run --rm \
-v "$(pwd):/work" \
--workdir /work \
-e VERSION -e PREINSTALL_CPANLIBS -e PREINSTALL_PACKAGES \
-e PKG_NAME -e DISTRIB -e REVISION \
-e DISTRIB_SEPARATOR -e DISTRIB_SUFFIX \
"${DOCKER_IMAGE}" \
bash .github/scripts/perl-cpan-libraries/package-cpan-deb-dhmaker.sh
shell: bash
- name: Replace '::' with - in the feature path
id: package-name
env:
PKG_NAME: ${{ matrix.name }}
run: |
name_with_dash="${PKG_NAME//::/-}"
echo "name_with_dash=$name_with_dash" >> $GITHUB_OUTPUT
shell: bash
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: packages-${{ matrix.package_extension }}-${{ matrix.distrib }}-${{ matrix.arch }}-${{ steps.package-name.outputs.name_with_dash}}
path: ./*.${{ matrix.package_extension }}
retention-days: 1
merge-package-deb-artifacts:
needs: [get-environment, package-deb]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, trixie, jammy, noble]
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: packages-deb-${{ matrix.distrib }}
pattern: packages-deb-${{ matrix.distrib }}-*
delete-merged: false # cannot be set to true due to random fails: Failed to DeleteArtifact: Unable to make request: ECONNRESET
retention-days: 1
- name: Delete merged artifacts
uses: geekyeggo/delete-artifact@176a747ab7e287e3ff4787bf8a148716375ca118 # v6.0.0
with:
name: packages-deb-${{ matrix.distrib }}-*
failOnError: false
download-and-cache-deb:
needs: [get-environment, merge-package-deb-artifacts]
if: |
needs.get-environment.outputs.skip_workflow == 'false' &&
needs.get-environment.outputs.stability != 'stable'
runs-on: ubuntu-24.04
strategy:
matrix:
distrib: [bullseye, bookworm, trixie, jammy, noble]
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: packages-deb-${{ matrix.distrib }}
path: ./
- uses: actions/cache/save@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
path: ./*.deb
key: ${{ github.sha }}-${{ github.run_id }}-deb-${{ matrix.distrib }}
test-packages:
needs: [get-environment, sign-rpm, download-and-cache-deb]
strategy:
fail-fast: false
matrix:
include:
- package_extension: rpm
image: almalinux:8
distrib: el8
arch: amd64
runner_name: ubuntu-24.04
- package_extension: rpm
image: almalinux:9
distrib: el9
arch: amd64
runner_name: ubuntu-24.04
- package_extension: rpm
image: almalinux:10
distrib: el10
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: debian:bullseye
distrib: bullseye
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: debian:bookworm
distrib: bookworm
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: debian:trixie
distrib: trixie
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: ubuntu:jammy
distrib: jammy
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: ubuntu:noble
distrib: noble
arch: amd64
runner_name: ubuntu-24.04
- package_extension: deb
image: debian:bullseye
distrib: bullseye
arch: arm64
runner_name: ubuntu-24.04-arm
- package_extension: deb
image: debian:bookworm
distrib: bookworm
arch: arm64
runner_name: ubuntu-24.04-arm
- package_extension: deb
image: debian:trixie
distrib: trixie
arch: arm64
runner_name: ubuntu-24.04-arm
runs-on: ${{ matrix.runner_name }}
container:
image: ${{ matrix.image }}
name: Test perl CPAN libs packages on ${{ matrix.package_extension }} ${{ matrix.distrib }} ${{ matrix.arch }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Test packaged libs
uses: ./.github/actions/test-cpan-libs
with:
package_extension: ${{ matrix.package_extension }}
distrib: ${{ matrix.distrib }}
arch: ${{ matrix.arch }}
stability: ${{ needs.get-environment.outputs.stability }}
- name: Upload error log
if: failure()
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: install_error_log_${{ matrix.distrib }}-${{ matrix.arch }}
path: install_error_${{ matrix.distrib }}_${{ matrix.arch }}.log
deliver-packages:
needs: [get-environment, sign-rpm, download-and-cache-deb, test-packages]
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
- distrib: bullseye
package_extension: deb
- distrib: bookworm
package_extension: deb
- distrib: trixie
package_extension: deb
- distrib: jammy
package_extension: deb
- distrib: noble
package_extension: deb
name: deliver ${{ matrix.distrib }}
steps:
- name: Checkout sources
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Delivery
uses: ./.github/actions/package-delivery
with:
module_name: perl-cpan-libraries
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 }}
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