Skip to content

SRE-2452 rpms: Script to build RPMs from scratch #31

SRE-2452 rpms: Script to build RPMs from scratch

SRE-2452 rpms: Script to build RPMs from scratch #31

name: RPM Build Script Test
on:
pull_request:
permissions: {}
jobs:
Run_in_docker:
runs-on: ubuntu-latest
strategy:
matrix:
os: ["rockylinux:8", "rockylinux:9"]
# os: ["rockylinux:8", "rockylinux:9", "opensuse/leap:15.4", "opensuse/leap:15.5"]
platform: ["amd64"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: List contents
run: |
echo $PWD
ls -lrt
- name: Build Docker image
run: |
docker build --no-cache --platform "linux/${{ matrix.platform }}" -t "shell-script-tester-${{ matrix.os }}-${{ matrix.platform }}" - <<"EOF"
FROM ${{ matrix.os }}
EOF
- name: Run Shell Script in Docker
run: |
rpms_dir=rpms
mkdir -p "$rpms_dir"
docker run -v .:/daos -v $rpms_dir:/root/rpms --rm --platform "linux/${{ matrix.platform }}" "shell-script-tester-${{ matrix.os }}-${{ matrix.platform }}" \
/daos/utils/build_rpms_from_scratch.sh /root/rpms