Skip to content

Commit 9dc3a4e

Browse files
author
Pavel Siska
committed
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 fad8953 commit 9dc3a4e

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/copr-upload.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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: dnf install -y copr-cli
27+
- name: Mark github workspace as safe
28+
run: git config --system --add safe.directory $PWD
29+
- name: make rpm
30+
run: make rpm
31+
- name: make rpm-msec
32+
run: make rpm-msec
33+
- name: make rpm-nemea
34+
run: make rpm-nemea
35+
- name: Create copr config
36+
run: |
37+
mkdir ~/.config
38+
echo "${{ secrets.COPR_CONFIG }}" >> ~/.config/copr
39+
- name: Upload SRPM to copr
40+
run: |
41+
if [ "${{ github.ref }}" == "refs/heads/release" ]; then
42+
copr build @CESNET/ipfixprobe-testing build/pkg/rpm/rpmbuild/SRPMS/*
43+
elif [ "${{ github.ref }}" == "refs/heads/stable" ]; then
44+
copr build @CESNET/ipfixprrobe build/pkg/rpm/rpmbuild/SRPMS/*
45+
fi

0 commit comments

Comments
 (0)