Skip to content

Commit

Permalink
fix(ci): add new outputs to parse-distrib action (#5285)
Browse files Browse the repository at this point in the history
  • Loading branch information
kduret authored Nov 14, 2024
1 parent aa785f3 commit 71eb474
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion .github/actions/parse-distrib/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ outputs:
package_distrib_name:
description: "Distribution suffix in package name"
value: ${{ steps.parse-distrib.outputs.package_distrib_name }}
package_extension:
description: "Package extension (rpm or deb)"
value: ${{ steps.parse-distrib.outputs.package_extension }}
distrib_family:
description: "Distrib family (el, debian, ubuntu)"
value: ${{ steps.parse-distrib.outputs.distrib_family }}

runs:
using: "composite"
Expand All @@ -21,26 +27,39 @@ runs:
if [[ "${{ inputs.distrib }}" == "centos7" || "${{ inputs.distrib }}" == "el7" ]]; then
PACKAGE_DISTRIB_SEPARATOR="."
PACKAGE_DISTRIB_NAME="el7"
PACKAGE_EXTENSION="rpm"
DISTRIB_FAMILY="el"
elif [[ "${{ inputs.distrib }}" == "alma8" || "${{ inputs.distrib }}" == "el8" ]]; then
PACKAGE_DISTRIB_SEPARATOR="."
PACKAGE_DISTRIB_NAME="el8"
PACKAGE_EXTENSION="rpm"
DISTRIB_FAMILY="el"
elif [[ "${{ inputs.distrib }}" == "alma9" || "${{ inputs.distrib }}" == "el9" ]]; then
PACKAGE_DISTRIB_SEPARATOR="."
PACKAGE_DISTRIB_NAME="el9"
PACKAGE_EXTENSION="rpm"
DISTRIB_FAMILY="el"
elif [[ "${{ inputs.distrib }}" == "bullseye" ]]; then
PACKAGE_DISTRIB_SEPARATOR="+"
PACKAGE_DISTRIB_NAME="deb11u1"
PACKAGE_EXTENSION="deb"
DISTRIB_FAMILY="debian"
elif [[ "${{ inputs.distrib }}" == "bookworm" ]]; then
PACKAGE_DISTRIB_SEPARATOR="+"
PACKAGE_DISTRIB_NAME="deb12u1"
PACKAGE_EXTENSION="deb"
DISTRIB_FAMILY="debian"
elif [[ "${{ inputs.distrib }}" == "jammy" ]]; then
PACKAGE_DISTRIB_SEPARATOR="-"
PACKAGE_DISTRIB_NAME="0ubuntu.22.04"
PACKAGE_EXTENSION="deb"
DISTRIB_FAMILY="ubuntu"
else
echo "::error::Distrib ${{ inputs.distrib }} cannot be parsed"
exit 1
fi
echo "package_distrib_separator=$PACKAGE_DISTRIB_SEPARATOR" >> $GITHUB_OUTPUT
echo "package_distrib_name=$PACKAGE_DISTRIB_NAME" >> $GITHUB_OUTPUT
echo "package_extension=$PACKAGE_EXTENSION" >> $GITHUB_OUTPUT
echo "distrib_family=$DISTRIB_FAMILY" >> $GITHUB_OUTPUT
shell: bash

0 comments on commit 71eb474

Please sign in to comment.