Skip to content

Commit ff633ea

Browse files
committed
build client deb
1 parent 484213e commit ff633ea

File tree

2 files changed

+66
-1
lines changed

2 files changed

+66
-1
lines changed
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Build Bareos Client DEB
2+
3+
on:
4+
push:
5+
tags:
6+
- "Release/*"
7+
8+
jobs:
9+
build-deb:
10+
runs-on: ubuntu-22.04
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Install dependencies
17+
run: |
18+
sudo apt update
19+
sudo apt install -y build-essential cmake git \
20+
libssl-dev zlib1g-dev libacl1-dev liblzo2-dev \
21+
libjansson-dev bison flex \
22+
libreadline-dev pkg-config fakeroot
23+
24+
- name: Clone Bareos
25+
run: |
26+
git clone https://github.com/bareos/bareos.git
27+
cd bareos
28+
git fetch --all
29+
git checkout ${{ github.ref_name }} # ex: Release/24.0.4
30+
31+
- name: Build Bareos Client
32+
working-directory: bareos
33+
run: |
34+
mkdir -p build
35+
cd build
36+
37+
# Copier scripts Debian
38+
cp ../debian/bareos-filedaemon.preinst debian/preinst
39+
cp ../debian/bareos-filedaemon.postinst debian/postinst
40+
chmod +x debian/preinst debian/postinst
41+
42+
cmake -Dclient-only=ON \
43+
-DCMAKE_INSTALL_PREFIX=/usr \
44+
-DCPACK_PACKAGE_CONTACT="Libertech <contact@libertech.fr>" \
45+
-DCPACK_PACKAGE_VERSION=${{ github.ref_name##*/ }} \
46+
-DCPACK_DEBIAN_PACKAGE_MAINTAINER="Libertech <contact@libertech.fr>" \
47+
-DCPACK_DEBIAN_PACKAGE_DEPENDS="libssl3, zlib1g, libacl1, liblzo2-2, libjansson4, libreadline8" \
48+
-DCPACK_DEBIAN_PACKAGE_CONTROL_EXTRA="$(pwd)/debian/preinst;$(pwd)/debian/postinst" \
49+
..
50+
51+
make -j$(nproc)
52+
cpack -G DEB
53+
54+
- name: Upload DEB as artifact
55+
uses: actions/upload-artifact@v4
56+
with:
57+
name: bareos-client-deb
58+
path: bareos/build/*.deb
59+
60+
- name: Attach DEB to GitHub Release
61+
uses: softprops/action-gh-release@v1
62+
if: startsWith(github.ref, 'refs/tags/')
63+
with:
64+
files: bareos/build/*.deb
65+

.github/workflows/docker-image.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
on:
33
push:
44
branches:
5-
- main
5+
- mainxx
66

77
env:
88
REGISTRY: ghcr.io

0 commit comments

Comments
 (0)