Skip to content

.github/workflows/rpm.yml #53

.github/workflows/rpm.yml

.github/workflows/rpm.yml #53

Workflow file for this run

on:
workflow_dispatch:
inputs:
ppa:
description: "ppa sufix"
jobs:
rpbuild:
runs-on: ubuntu-22.04 #focal alien is not testing ok on docker fedora
steps:
- uses: actions/checkout@v3
- name: Run a multi-line script
run: |
#get deb
arh=`cat debian/control | grep ^Architecture | cut -d ' ' -f2`
name=`cat debian/changelog | head -1 | grep -o ^[^\ ]*`
version=`cat debian/changelog | head -1 | grep -Poe "[^\(]*(?=\))"`
#dist=`cat debian/changelog | head -1 | grep -Poe "[^ ]*(?=;)"`
if [ ! -e "lp2.py" ]; then
wget -q https://raw.githubusercontent.com/colin-i/test/master/lp2.py
fi
OUTPUT=$(python3 lp2.py ppa${{ github.event.inputs.ppa }} ${name} ${version} ${arh})
wget ${OUTPUT}/+files/${name}_${version}_${arh}.deb -O ${name}.deb
#make rpm
mkdir out
cd out
#sudo apt update
sudo apt install alien
sudo alien -rk ../${name}.deb
fname=`ls`
mv ${fname} ../${fname}
#no, BuildArch is x86_64, don't change to amd64
#fname2=${name}.${version}.${arh}.rpm
#${fname2} #alien says x86_64 but we coded elsewhere with amd64
echo "file=${fname}" >> $GITHUB_ENV
- name: artifact
uses: actions/upload-artifact@v3
with:
name: rpm
path: ./${{ env.file }}