summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/build-test.yaml2
-rwxr-xr-xtests/build.sh15
2 files changed, 12 insertions, 5 deletions
diff --git a/.github/workflows/build-test.yaml b/.github/workflows/build-test.yaml
index 9d3335c..60940e8 100644
--- a/.github/workflows/build-test.yaml
+++ b/.github/workflows/build-test.yaml
@@ -21,7 +21,7 @@ jobs:
- 'quay.io/centos/centos:stream8'
- 'quay.io/centos/centos:centos7'
steps:
- - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- name: Set the right OS in the Dockerfile
run: sed -i "s#^FROM.*#FROM ${{ matrix.os }}#" tests/Dockerfile
- name: Build image
diff --git a/tests/build.sh b/tests/build.sh
index fa3d28d..aa4f3da 100755
--- a/tests/build.sh
+++ b/tests/build.sh
@@ -3,13 +3,20 @@
set -e
set -x
-DNF=yum
-BUILDDEP_PROVIDER=yum-utils
-BUILDDEP=yum-builddep
-if type dnf 2> /dev/null ; then
+if type dnf5 2> /dev/null ; then
+ DNF=dnf
+ BUILDDEP_PROVIDER='dnf5-command(builddep)'
+ BUILDDEP='dnf builddep'
+elif type dnf 2> /dev/null ; then
DNF=dnf
BUILDDEP_PROVIDER='dnf-command(builddep)'
BUILDDEP='dnf builddep'
+elif type yum 2> /dev/null ; then
+ DNF=yum
+ BUILDDEP_PROVIDER=yum-utils
+ BUILDDEP=yum-builddep
+else
+ exit 1
fi
$DNF install -y rpm-build "$BUILDDEP_PROVIDER"