.github/workflows/rpm.yml #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` #all | |
arh_lp=amd64 | |
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_lp}) | |
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} | |
echo "file=${fname}" >> $GITHUB_ENV | |
- name: artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: rpm | |
path: ./${{ env.file }} |