Skip to content

Commit

Permalink
Update actions-rootfs-builder.yml: Tests enhacement AlmaLinux#5
Browse files Browse the repository at this point in the history
  • Loading branch information
yuravk committed Mar 15, 2024
1 parent a4fd1bb commit c0a9fc1
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/actions-rootfs-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ jobs:
platforms="${{ inputs.platform }}"
for platform in ${platforms//,/ }; do
echo "Testing ${{ inputs.major_version }} ${{ matrix.image_types }} ${platform} image"
echo "Testing ${{ inputs.major_version }} ${{ matrix.image_types }} ${platform} image:"
run_arch=${platform#linux/}
# docker run --platform=${platform} ${{ steps.build-images.outputs.imageid }} /bin/bash -c " \
Expand All @@ -302,15 +302,26 @@ jobs:
x86_64amd64|ppc64leppc64le|s390xs390x|aarch64arm64)
true;;
*)
echo " ${run_arch} doesn't match ${arch}"; false ;;
echo " - ${run_arch} doesn't match ${arch}" && false ;;
esac
echo " ${run_arch} matches ${arch}"
echo " + ${run_arch} matches ${arch}"
almalinux_release=$( docker run --platform=${platform} ${{ steps.build-images.outputs.digest }} /bin/bash -c "cat /etc/almalinux-release" )
[[ ${almalinux_release} = *'AlmaLinux release ${{ inputs.major_version }}'* ]] && echo " ${almalinux_release} matches" || false
docker run --platform=${platform} ${{ steps.build-images.outputs.digest }} /bin/bash -c " \
( test "${{ matrix.image_types }}" != "micro" && rpm -q gpg-pubkey) || true "
if [[ ${almalinux_release} = *'AlmaLinux release ${{ inputs.major_version }}'* ]]; then
echo " + ${almalinux_release} matched"
else
echo " - ${almalinux_release} did not match" && false
fi
if [ "${{ matrix.image_types }}" != "micro" ]; then
gpg_pubkey=$( docker run --platform=${platform} ${{ steps.build-images.outputs.digest }} /bin/bash -c "rpm -q gpg-pubkey" )
if [ -n ${gpg_pubkey} ]; then
echo " + GPG KEYS:"
echo "${gpg_pubkey}"
else
echo " GPG KEY not installed." && false
fi
fi
done
-
Expand Down

0 comments on commit c0a9fc1

Please sign in to comment.