-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (33 loc) · 1.02 KB
/
main.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
41
name: Build RPM
on:
- push
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Docker
uses: docker/setup-buildx-action@v3
- name: Build RPM
run: |
docker run --rm -v $(pwd):/workspace -w /workspace fedora:latest bash -c "
dnf install -y dnf-plugins-core rpmdevtools &&
spectool --get-files --directory=SOURCES --all SPECS/*.spec &&
dnf builddep -y SPECS/*.spec &&
rpmbuild --define '_topdir /workspace' -ba SPECS/*.spec &&
grep -i '^version' SPECS/*.spec | awk '{print \"Driver Ver: \" \$2}' >> release.log &&
rpm -q --qf 'Kernel Ver: %{VERSION}-%{RELEASE}\n' kernel-devel >> release.log
"
- name: Check
run: |
ls -l BUILD/*
cat release.log
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ github.sha }}
body_path: release.log
files: RPMS/*