-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (65 loc) · 2.36 KB
/
build-client-deb.yml
File metadata and controls
77 lines (65 loc) · 2.36 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Build Bareos All Packages
on:
push:
branches:
- main
pull_request:
jobs:
build-deb:
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt install -y build-essential cmake git \
libssl-dev zlib1g-dev libacl1-dev liblzo2-dev \
libjansson-dev bison flex \
libreadline-dev pkg-config fakeroot \
libpq-dev libsystemd-dev \
php php-cli php-mbstring php-xml \
libldap2-dev
- name: Clone Bareos
run: git clone https://github.com/bareos/bareos.git bareos-repo
- name: Extract version from VERSION File
id: vars
run: |
VERSION=$(cat VERSION | tr -d ' \n')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Checkout release
working-directory: ./bareos-repo
run: |
git fetch --all
git checkout Release/${VERSION}
mkdir build
- name: Configure CMake (tous composants)
working-directory: ./bareos-repo
run: |
cmake -S . -B build \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCPACK_PACKAGE_CONTACT="contact@libertech.fr" \
-DCPACK_PACKAGE_VERSION="${{ env.VERSION }}" \
-DCPACK_DEBIAN_PACKAGE_MAINTAINER="contact@libertech.fr" \
-DCPACK_DEBIAN_PACKAGE_CONTROL_EXTRA="debian/preinst;debian/postinst" \
-Dwebui=ON
cmake --build build -- -j$(nproc)
- name: Make DEB packages
working-directory: ./bareos-repo/build
run: |
# copie des scripts pre/postinst si dispo
cp ./debian/*.preinst ./debian/preinst 2>/dev/null || true
cp ./debian/*.postinst ./debian/postinst 2>/dev/null || true
chmod +x ./debian/preinst ./debian/postinst || true
# génération des paquets pour tous les composants
cpack -G DEB
- name: Upload DEBs as artifact
uses: actions/upload-artifact@v4
with:
name: bareos-all-${{ env.VERSION }}
path: bareos-repo/build/*.deb
- name: Attach DEBs to GitHub Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: bareos-repo/build/*.deb