name: perl-crypt-argon2 concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true on: workflow_dispatch: pull_request: paths: - "dependencies/perl-crypt-argon2/**" push: branches: - develop - dev-[2-9][0-9].[0-9][0-9].x - master - "[2-9][0-9].[0-9][0-9].x" paths: - "dependencies/perl-crypt-argon2/**" tags: - perl-crypt-argon2-* jobs: get-environment: uses: ./.github/workflows/get-environment.yml package: needs: [get-environment] if: | needs.get-environment.outputs.skip_workflow == 'false' && needs.get-environment.outputs.stability != 'stable' strategy: fail-fast: false matrix: include: - image: packaging-plugins-alma8 distrib: el8 package_extension: rpm runner: ubuntu-22.04 arch: amd64 - image: packaging-plugins-alma9 distrib: el9 package_extension: rpm runner: ubuntu-22.04 arch: amd64 - image: packaging-plugins-bullseye distrib: bullseye package_extension: deb runner: ubuntu-22.04 arch: amd64 - image: packaging-plugins-bookworm distrib: bookworm package_extension: deb runner: ubuntu-22.04 arch: amd64 - image: packaging-plugins-jammy distrib: jammy package_extension: deb runner: ubuntu-22.04 arch: amd64 - image: packaging-plugins-bullseye-arm64 distrib: bullseye package_extension: deb runner: ["self-hosted", "collect-arm64"] arch: arm64 runs-on: ${{ matrix.runner }} container: image: ${{ vars.DOCKER_INTERNAL_REGISTRY_URL }}/${{ matrix.image }}:latest credentials: username: ${{ secrets.HARBOR_CENTREON_PULL_USERNAME }} password: ${{ secrets.HARBOR_CENTREON_PULL_TOKEN }} name: package ${{ matrix.distrib }} ${{ matrix.arch }} steps: - name: Checkout sources uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Install locally Crypt::Argon2 run: | if [[ "${{ matrix.package_extension }}" == "deb" ]]; then apt-get update apt-get install -y cpanminus gcc else dnf install -y cpanminus gcc fi cpanm -v -l /tmp Crypt::Argon2@0.020 shell: bash - name: Set package name and paths according to distrib run: | PERL_VERSION=$(perl -E "say $^V" | sed -E "s/v([0-9]+\.[0-9]+).+/\1/g") echo "Perl version is $PERL_VERSION" if [[ "${{ matrix.package_extension }}" == "deb" ]]; then NAME="libcrypt-argon2-perl" if [ "${{ matrix.arch }}" = "amd64" ]; then PERL_VENDORARCH="/usr/lib/x86_64-linux-gnu/perl/$PERL_VERSION" else PERL_VENDORARCH="/usr/lib/aarch64-linux-gnu/perl/$PERL_VERSION" fi else NAME="perl-Crypt-Argon2" if [ "${{ matrix.distrib }}" = "el8" ]; then PERL_VENDORARCH="/usr/local/lib64/perl5" else PERL_VENDORARCH="/usr/local/lib64/perl5/$PERL_VERSION" fi fi sed -i "s/@NAME@/$NAME/g" dependencies/perl-crypt-argon2/perl-crypt-argon2.yaml sed -i "s#@PERL_VENDORARCH@#$PERL_VENDORARCH#g" dependencies/perl-crypt-argon2/perl-crypt-argon2.yaml cat dependencies/perl-crypt-argon2/perl-crypt-argon2.yaml shell: bash - name: Package uses: ./.github/actions/package-nfpm with: nfpm_file_pattern: "dependencies/perl-crypt-argon2/perl-crypt-argon2.yaml" distrib: ${{ matrix.distrib }} package_extension: ${{ matrix.package_extension }} arch: ${{ matrix.arch }} release: 1 commit_hash: ${{ github.sha }} cache_key: cache-${{ github.sha }}-${{ matrix.package_extension }}-perl-crypt-argon2-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }} 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 }} # set condition to true if artifacts are needed - if: ${{ false }} name: Upload package artifacts uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0 with: name: packages-${{ matrix.distrib }}-${{ matrix.arch }} path: ./*.${{ matrix.package_extension}} retention-days: 1 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 arch: amd64 - distrib: el9 package_extension: rpm arch: amd64 - distrib: bullseye package_extension: deb arch: amd64 - distrib: bullseye package_extension: deb arch: arm64 - distrib: bookworm package_extension: deb arch: amd64 - distrib: jammy package_extension: deb arch: amd64 name: deliver ${{ matrix.distrib }} ${{ matrix.arch }} steps: - name: Checkout sources uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0 - name: Delivery uses: ./.github/actions/package-delivery with: module_name: perl-crypt-argon2-${{ matrix.arch }} distrib: ${{ matrix.distrib }} arch: ${{ matrix.arch }} cache_key: cache-${{ github.sha }}-rpm-perl-crypt-argon2-${{ matrix.distrib }}-${{ matrix.arch }}-${{ github.head_ref || github.ref_name }} 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