Skip to content

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

SRE-2452 rpms: Script to build RPMs from scratch

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

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 }}
#RUN if [ -f /etc/rocky-release ]; then yum -y install bash; fi
#RUN if [ -f /etc/os-release ] && grep -qi opensuse /etc/os-release; then zypper -n install bash; fi
EOF
- name: Run Shell Script in Docker
run: |
docker run -m 16G -v .:/daos --rm --platform "linux/${{ matrix.platform }}" "shell-script-tester-${{ matrix.os }}-${{ matrix.platform }}" \
/daos/utils/build_rpms_from_scratch.sh