Skip to content

Commit f4f7d31

Browse files
committed
Update build-client-deb.yml
1 parent 9f04236 commit f4f7d31

File tree

1 file changed

+18
-28
lines changed

1 file changed

+18
-28
lines changed
Lines changed: 18 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
1-
name: Build Bareos DEB Packages
1+
name: Build Bareos DEB packages
22

33
on:
44
push:
55
branches:
66
- main
7-
pull_request:
87

98
jobs:
109
build-deb:
@@ -17,55 +16,46 @@ jobs:
1716
- name: Install build dependencies
1817
run: |
1918
sudo apt update
20-
sudo apt install -y build-essential devscripts equivs \
21-
fakeroot cmake git \
19+
sudo apt install -y build-essential debhelper devscripts fakeroot \
20+
cmake git \
2221
libssl-dev zlib1g-dev libacl1-dev liblzo2-dev \
2322
libjansson-dev bison flex \
2423
libreadline-dev pkg-config
2524
26-
- name: Clone Bareos repo
25+
- name: Clone Bareos sources
2726
run: |
2827
git clone https://github.com/bareos/bareos.git bareos-repo
29-
cd bareos-repo
30-
git fetch --all
31-
git checkout Release/24.0.4 # adapte selon la version
3228
33-
- name: Extract version
34-
id: version
35-
run: echo "VERSION=$(cat bareos-repo/VERSION)" >> $GITHUB_ENV
29+
- name: Checkout release
30+
working-directory: ./bareos-repo
31+
run: |
32+
git fetch --all
33+
git checkout Release/24.0.4
34+
# Lire la version dans le fichier VERSION
35+
VERSION=$(cat VERSION)
36+
echo "VERSION=$VERSION" >> $GITHUB_ENV
3637
3738
- name: Prepare debian/changelog
3839
working-directory: ./bareos-repo
3940
run: |
4041
VERSION=$(cat VERSION)
4142
cat > debian/changelog <<EOF
42-
bareos ($VERSION-1) stable; urgency=medium
43+
bareos ($VERSION-1) unstable; urgency=medium
4344

4445
* Automated build from GitHub Actions.
4546

4647
-- Libertech <contact@libertech.fr> $(date -R)
4748
EOF
48-
- name: Build DEB packages
49+
cat debian/changelog
50+
51+
- name: Build all Bareos components
4952
working-directory: ./bareos-repo
5053
run: |
51-
# S'assurer que le changelog est là
52-
ls -la debian
53-
head -20 debian/changelog
54-
# Installe les dépendances nécessaires déclarées dans debian/control
55-
sudo mk-build-deps -i -r -t "apt-get -y" debian/control
56-
# Lance la compilation de tous les paquets
5754
dpkg-buildpackage -us -uc -b
58-
ls -lh ../*.deb
5955
60-
- name: Upload all DEB packages
56+
- name: Upload DEB packages
6157
uses: actions/upload-artifact@v4
6258
with:
63-
name: bareos-${{ env.VERSION }}-debs
59+
name: bareos-debs-${{ env.VERSION }}
6460
path: ../*.deb
6561

66-
- name: Attach DEBs to GitHub Release
67-
if: startsWith(github.ref, 'refs/tags/')
68-
uses: softprops/action-gh-release@v1
69-
with:
70-
files: ../*.deb
71-

0 commit comments

Comments
 (0)