Skip to content

Commit ce36f1f

Browse files
Pavel SiskaSiskaPavel
Pavel Siska
authored andcommitted
Github-actions: Add copr-upload workflow
Upload srpm files to copr (@ipfixprobe-testing) on push to branch release and to (@ipfixprobe) on push to branch stable
1 parent 1d31be9 commit ce36f1f

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/copr-upload.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: upload SRPM to copr
2+
3+
on:
4+
push:
5+
branches:
6+
- release
7+
- stable
8+
9+
jobs:
10+
upload-srpm-to-copr:
11+
runs-on: ubuntu-latest
12+
container: oraclelinux:9
13+
steps:
14+
- name: Install git
15+
run: dnf install -y git
16+
- name: Check out repository code
17+
uses: actions/checkout@v4
18+
- name: Install dependencies
19+
uses: ./.github/actions/install-dependencies
20+
with:
21+
pcap: true
22+
dpdk: true
23+
nfb: true
24+
nemea: true
25+
- name: Install copr-cli
26+
run: |
27+
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
28+
dnf install -y copr-cli
29+
- name: Mark github workspace as safe
30+
run: git config --system --add safe.directory $PWD
31+
- name: make rpm
32+
run: make rpm
33+
- name: make rpm-msec
34+
run: make rpm-msec
35+
- name: make rpm-nemea
36+
run: make rpm-nemea
37+
- name: Create copr config
38+
run: |
39+
mkdir ~/.config
40+
echo "${{ secrets.COPR_CONFIG }}" >> ~/.config/copr
41+
- name: Upload SRPM to copr
42+
run: |
43+
if [ "${{ github.ref }}" == "refs/heads/release" ]; then
44+
copr build @CESNET/ipfixprobe-testing build/pkg/rpm/rpmbuild/SRPMS/*
45+
elif [ "${{ github.ref }}" == "refs/heads/stable" ]; then
46+
copr build @CESNET/ipfixprobe build/pkg/rpm/rpmbuild/SRPMS/*
47+
fi

0 commit comments

Comments
 (0)