@@ -217,20 +217,37 @@ jobs:
217217 repository : whamCloud/victorialogs-rpm
218218 path : victorialogs-rpm
219219
220- - name : Install RPM build tools
220+ - name : Build EL8 RPMs using Rocky Linux 8 container
221221 run : |
222- if ! command -v rpmbuild &> /dev/null; then
223- echo "Installing RPM build tools..."
224- sudo dnf install -y rpm-build rpmdevtools
225- else
226- echo "RPM build tools already installed"
227- fi
228-
229- - name : Build RPMs for EL8 and EL9
230- working-directory : victorialogs-rpm
222+ echo "Building EL8 RPMs for version ${{ github.event.inputs.version }}..."
223+ docker run --rm \
224+ -v $(pwd)/victorialogs-rpm:/build \
225+ -v $(pwd)/VictoriaLogs/bin:/binaries \
226+ -w /build \
227+ rockylinux:8 \
228+ bash -c "
229+ set -e
230+ echo 'Installing RPM build tools...'
231+ dnf install -y rpm-build systemd-rpm-macros rpmdevtools
232+ echo 'Building EL8 RPMs...'
233+ make rpm VERSION=${{ github.event.inputs.version }}
234+ "
235+
236+ - name : Build EL9 RPMs using Rocky Linux 9 container
231237 run : |
232- echo "Building RPMs for version ${{ github.event.inputs.version }}..."
233- make rpm VERSION=${{ github.event.inputs.version }}
238+ echo "Building EL9 RPMs for version ${{ github.event.inputs.version }}..."
239+ docker run --rm \
240+ -v $(pwd)/victorialogs-rpm:/build \
241+ -v $(pwd)/VictoriaLogs/bin:/binaries \
242+ -w /build \
243+ rockylinux:9 \
244+ bash -c "
245+ set -e
246+ echo 'Installing RPM build tools...'
247+ dnf install -y rpm-build systemd-rpm-macros rpmdevtools
248+ echo 'Building EL9 RPMs...'
249+ make rpm VERSION=${{ github.event.inputs.version }}
250+ "
234251
235252 - name : List built RPMs
236253 working-directory : victorialogs-rpm
0 commit comments