Skip to content

check_ssl_cert-2.81.0 #154

check_ssl_cert-2.81.0

check_ssl_cert-2.81.0 #154

Workflow file for this run

name: Publish RPM
on:
workflow_dispatch:
release:
types: [published]
permissions:
contents: read
jobs:
linux:
# The host should always be linux
runs-on: ubuntu-latest
name: Building RPMs on ${{ matrix.distro }}
strategy:
fail-fast: false
matrix:
distro:
- 'centos:7'
- 'centos:8'
- 'fedora:38'
- 'fedora:39'
include:
- distro: 'fedora:38'
pre: >-
dnf install -y hostname &&
dnf install -y nmap ShellCheck curl sudo perl make bzip2 file openssl rpm-build openssh-clients bc bash-completion
- distro: 'fedora:39'
pre: >-
dnf install -y hostname &&
dnf install -y nmap ShellCheck curl sudo perl make bzip2 file openssl rpm-build openssh-clients bc bash-completion
- distro: 'centos:7'
pre: >-
yum install -y nmap curl sudo perl make bzip2 file openssl perl-ExtUtils-MakeMaker perl-Test-Simple rpm-build openssh-clients b bash-completionc &&
scversion="stable"; curl -Ls "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv && cp "shellcheck-${scversion}/shellcheck" /usr/bin/
- distro: 'centos:8'
pre: >-
sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-Linux-* &&
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-Linux-* &&
dnf install -y nmap curl sudo perl make bzip2 file openssl rpm-build openssh-clients bc bash-completion &&
scversion="stable"; curl -Ls "https://github.com/koalaman/shellcheck/releases/download/${scversion?}/shellcheck-${scversion?}.linux.x86_64.tar.xz" | tar -xJv && cp "shellcheck-${scversion}/shellcheck" /usr/bin/
steps:
- name: Git clone repository
uses: actions/checkout@v4
with:
submodules: true
- name: Build the RPM on ${{ matrix.distro }}
env:
PRE: ${{ matrix.pre }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
echo $PRE > ./prep-cmd.sh
echo "${SSH_PRIVATE_KEY}" > id_rsa
docker run --network host -w /check_ssl_cert -v ${PWD}:/check_ssl_cert ${{ matrix.distro }} \
/bin/sh -c 'sh ./prep-cmd.sh \
&& uname -a \
&& whoami \
&& pwd \
&& . ./utils/prepare_rpm.sh \
&& echo "$RPM --> $RPMDIR" \
&& echo "$SRPM --> $SRPMDIR" \
&& mkdir /root/.ssh \
&& chmod 700 /root/.ssh \
&& cp id_rsa /root/.ssh \
&& chmod 600 /root/.ssh/id_rsa \
&& scp -oStrictHostKeyChecking=no $RPM [email protected]:$RPMDIR \
&& scp -oStrictHostKeyChecking=no $SRPM [email protected]:$SRPMDIR \
&& echo "Updating /var/www/rpm/$DIST/$RELEASE" \
&& ssh -oStrictHostKeyChecking=no [email protected] "createrepo /var/www/rpm/$DIST/$RELEASE" '