-
-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.29 KB
/
rpm.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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 }}