Skip to content

Commit 7567aef

Browse files
Merge branch 'release-1.36' of github.com:ZoneMinder/zoneminder into release-1.36
2 parents 441b586 + 6c6d09c commit 7567aef

28 files changed

Lines changed: 513 additions & 69 deletions
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
name: build-native-packages-signed-aarch64
2+
3+
on:
4+
push:
5+
branches: [ release-1.36 ]
6+
permissions:
7+
contents: write
8+
env:
9+
GPG_KEY_ID: ${{ secrets.ZMREPO_GPG_KEY_ID }}
10+
GPG_PASSPHRASE: ${{ secrets.ZMREPO_GPG_PASSPHRASE }}
11+
GPG_PRIVATE_KEY_B64: ${{ secrets.ZMREPO_GPG_PRIVATE_KEY_B64 }}
12+
DEBEMAIL: "info@zoneminder.com"
13+
DEBFULLNAME: "Github CI"
14+
TZ: America/New_York
15+
DEBIAN_FRONTEND: noninteractive
16+
DEBSIGN_KEYID: ${{ secrets.ZMREPO_GPG_KEY_ID }}
17+
SMPFLAGS: -j10
18+
19+
jobs:
20+
build-debian:
21+
name: Build & sign .deb (${{ matrix.distro }})
22+
if: github.repository == 'ZoneMinder/zoneminder'
23+
strategy:
24+
fail-fast: false
25+
matrix:
26+
distro: ["debian:sid", "debian:13", "debian:12", "ubuntu:25.10", "ubuntu:devel", "ubuntu:24.04", "ubuntu:22.04"]
27+
runs-on: self-hosted
28+
29+
container:
30+
image: ${{ matrix.distro }}
31+
32+
steps:
33+
- name: Prep apt
34+
run: |
35+
set -eux
36+
echo "Acquire::HTTP::Proxy \"http://192.168.9.128:3142\";" > /etc/apt/apt.conf.d/01proxy
37+
38+
if grep -q '^deb http' /etc/apt/sources.list && ! grep -q '^deb-src'\
39+
/etc/apt/sources.list; then
40+
sed -n 's/^deb /deb-src /p' /etc/apt/sources.list >> \
41+
/etc/apt/sources.list
42+
fi
43+
if [ -f /etc/apt/sources.list.d/debian.sources ]; then
44+
sed -i 's/^Types: deb$/Types: deb deb-src/g' \
45+
/etc/apt/sources.list.d/debian.sources
46+
fi
47+
if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then
48+
sed -i 's/^Types: deb$/Types: deb deb-src/g' \
49+
/etc/apt/sources.list.d/ubuntu.sources
50+
fi
51+
apt-get update
52+
- name: Install build tools
53+
run: |
54+
set -eux
55+
apt install -y --no-install-recommends \
56+
git ca-certificates gnupg lsb-release \
57+
build-essential devscripts debhelper equivs fakeroot \
58+
cmake pkg-config ccache curl bash rsync openssh-client
59+
apt install -y debhelper sphinx-doc dh-linktree dh-apache2 cmake \
60+
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
61+
libswresample-dev libswscale-dev libbz2-dev \
62+
libturbojpeg0-dev default-libmysqlclient-dev \
63+
libpolkit-gobject-1-dev libv4l-dev libvlc-dev libssl-dev \
64+
libvncserver-dev libjwt-gnutls-dev libgsoap-dev gsoap \
65+
libmosquittopp-dev
66+
67+
- name: Checkout
68+
uses: actions/checkout@v6
69+
with:
70+
fetch-depth: 0
71+
72+
- name: Import GPG key
73+
uses: crazy-max/ghaction-import-gpg@v6
74+
with:
75+
gpg_private_key: ${{ secrets.ZMREPO_GPG_PRIVATE_KEY }}
76+
passphrase: ${{ secrets.ZMREPO_GPG_PASSPHRASE }}
77+
git_user_signingkey: false
78+
git_commit_gpgsign: false
79+
80+
- name: Install build-deps from debian/control
81+
run: |
82+
set -eux
83+
ln -sf distros/ubuntu2004 debian
84+
mk-build-deps -ir -t "apt-get -y --no-install-recommends" \
85+
debian/control
86+
- name: Build (signed)
87+
env:
88+
DEB_BUILD_OPTIONS: "parallel=$(nproc)"
89+
# gpg picks passphrase from environment via loopback
90+
run: |
91+
cd ../
92+
ln -sf zoneminder ZoneMinder_ZoneMinder.git
93+
# Needed because we are running as root
94+
git config --global --add safe.directory /__w/zoneminder/zoneminder
95+
git config --global --add safe.directory /__w/zoneminder/ZoneMinder_ZoneMinder.git/.git
96+
#git submodule init
97+
#git submodule update --init --recursive
98+
curl -s -o do_debian_package.sh https://raw.githubusercontent.com/ZoneMinder/zoneminder/refs/heads/master/utils/do_debian_package.sh
99+
chmod +x do_debian_package.sh
100+
101+
# Tell gpg to use loopback + passphrase
102+
export GPG_TTY=$(tty || true)
103+
ls -l /bin/bash
104+
./do_debian_package.sh -s=CURRENT -b=release-1.36 -t=binary -v=1
105+
- name: Collect .deb artifacts (incl. signed metadata & public key)
106+
run: |
107+
set -eux
108+
mkdir -p artifacts/deb
109+
mv ../*.deb ../*.buildinfo ../*.changes ../*.dsc ../*.tar.xz ../*.tar.gz artifacts/deb/ || true
110+
# quick verify signatures (non-fatal)
111+
gpg --verify artifacts/deb/*.changes || true
112+
gpg --verify artifacts/deb/*.buildinfo || true
113+
- name: Sanitize Artifact name
114+
id: prep_artifact_name
115+
run: |
116+
# Use `sed` to replace invalid characters with a hyphen
117+
sanitized_distro_name=$(echo -n "${{ matrix.distro }}" | sed -e 's/[;\\\/:<>"|*?]/_/g' -e 's/__*/_/g')
118+
echo "artifact_name=binary-${sanitized_distro_name}" >> $GITHUB_ENV
119+
120+
- name: Upload .deb artifacts
121+
uses: actions/upload-artifact@v6
122+
with:
123+
path: artifacts/deb
124+
name: ${{ env.artifact_name }}
125+
- name: Publish to ZMREPO
126+
uses: easingthemes/ssh-deploy@main
127+
env:
128+
SSH_PRIVATE_KEY: ${{ secrets.ZMREPO_SSH_KEY }}
129+
ARGS: "-rltgoDzvO"
130+
SOURCE: artifacts/deb/
131+
REMOTE_HOST: ${{ secrets.ZMREPO_HOST }}
132+
REMOTE_USER: ${{ secrets.ZMREPO_SSH_USER }}
133+
TARGET: debian/proposed/mini-dinstall/incoming/
134+
135+
release:
136+
name: Create GitHub Release (on tag)
137+
needs: build-debian
138+
if: github.repository == 'ZoneMinder/zoneminder' && startsWith(github.ref, 'refs/tags/')
139+
runs-on: ubuntu-latest
140+
steps:
141+
- name: Download artifacts
142+
uses: actions/download-artifact@v7
143+
with:
144+
path: dist
145+
- name: Create release
146+
uses: softprops/action-gh-release@v2
147+
with:
148+
files: dist/**/*
Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
name: build-native-packages-signed-aarch64
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
branches: [ release-1.36 ]
7+
permissions:
8+
contents: write
9+
env:
10+
GPG_KEY_ID: ${{ secrets.ZMREPO_GPG_KEY_ID }}
11+
GPG_PASSPHRASE: ${{ secrets.ZMREPO_GPG_PASSPHRASE }}
12+
GPG_PRIVATE_KEY_B64: ${{ secrets.ZMREPO_GPG_PRIVATE_KEY_B64 }}
13+
DEBEMAIL: "info@zoneminder.com"
14+
DEBFULLNAME: "Github CI"
15+
TZ: America/New_York
16+
DEBIAN_FRONTEND: noninteractive
17+
DEBSIGN_KEYID: ${{ secrets.ZMREPO_GPG_KEY_ID }}
18+
SMPFLAGS: -j10
19+
20+
jobs:
21+
build-debian:
22+
name: Build & sign .deb (${{ matrix.distro }})
23+
if: github.repository == 'ZoneMinder/zoneminder'
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
distro: ["debian:sid", "debian:13", "debian:12", "ubuntu:25.10", "ubuntu:devel", "ubuntu:24.04", "ubuntu:22.04"]
28+
runs-on: self-hosted
29+
30+
container:
31+
image: ${{ matrix.distro }}
32+
33+
steps:
34+
- name: Prep apt
35+
run: |
36+
set -eux
37+
echo "Acquire::HTTP::Proxy \"http://192.168.9.128:3142\";" > /etc/apt/apt.conf.d/01proxy
38+
39+
if grep -q '^deb http' /etc/apt/sources.list && ! grep -q '^deb-src'\
40+
/etc/apt/sources.list; then
41+
sed -n 's/^deb /deb-src /p' /etc/apt/sources.list >> \
42+
/etc/apt/sources.list
43+
fi
44+
if [ -f /etc/apt/sources.list.d/debian.sources ]; then
45+
sed -i 's/^Types: deb$/Types: deb deb-src/g' \
46+
/etc/apt/sources.list.d/debian.sources
47+
fi
48+
if [ -f /etc/apt/sources.list.d/ubuntu.sources ]; then
49+
sed -i 's/^Types: deb$/Types: deb deb-src/g' \
50+
/etc/apt/sources.list.d/ubuntu.sources
51+
fi
52+
apt-get update
53+
- name: Install build tools
54+
run: |
55+
set -eux
56+
apt install -y --no-install-recommends \
57+
git ca-certificates gnupg lsb-release \
58+
build-essential devscripts debhelper equivs fakeroot \
59+
cmake pkg-config ccache curl bash rsync openssh-client
60+
apt install -y debhelper sphinx-doc dh-linktree dh-apache2 cmake \
61+
libavcodec-dev libavdevice-dev libavformat-dev libavutil-dev \
62+
libswresample-dev libswscale-dev libbz2-dev \
63+
libturbojpeg0-dev default-libmysqlclient-dev \
64+
libpolkit-gobject-1-dev libv4l-dev libvlc-dev libssl-dev \
65+
libvncserver-dev libjwt-gnutls-dev libgsoap-dev gsoap \
66+
libmosquittopp-dev
67+
68+
- name: Checkout
69+
uses: actions/checkout@v6
70+
with:
71+
fetch-depth: 0
72+
73+
- name: Import GPG key
74+
uses: crazy-max/ghaction-import-gpg@v6
75+
with:
76+
gpg_private_key: ${{ secrets.ZMREPO_GPG_PRIVATE_KEY }}
77+
passphrase: ${{ secrets.ZMREPO_GPG_PASSPHRASE }}
78+
git_user_signingkey: false
79+
git_commit_gpgsign: false
80+
81+
- name: Install build-deps from debian/control
82+
run: |
83+
set -eux
84+
ln -sf distros/ubuntu2004 debian
85+
mk-build-deps -ir -t "apt-get -y --no-install-recommends" \
86+
debian/control
87+
- name: Build (signed)
88+
env:
89+
DEB_BUILD_OPTIONS: "parallel=$(nproc)"
90+
# gpg picks passphrase from environment via loopback
91+
run: |
92+
cd ../
93+
ln -sf zoneminder ZoneMinder_ZoneMinder.git
94+
# Needed because we are running as root
95+
git config --global --add safe.directory /__w/zoneminder/zoneminder
96+
git config --global --add safe.directory /__w/zoneminder/ZoneMinder_ZoneMinder.git/.git
97+
#git submodule init
98+
#git submodule update --init --recursive
99+
curl -s -o do_debian_package.sh https://raw.githubusercontent.com/ZoneMinder/zoneminder/refs/heads/master/utils/do_debian_package.sh
100+
chmod +x do_debian_package.sh
101+
102+
# Tell gpg to use loopback + passphrase
103+
export GPG_TTY=$(tty || true)
104+
ls -l /bin/bash
105+
./do_debian_package.sh -r ${{ github.event.release.tag_name }} -t=binary -v1
106+
- name: Collect .deb artifacts (incl. signed metadata & public key)
107+
run: |
108+
set -eux
109+
mkdir -p artifacts/deb
110+
mv ../*.deb ../*.buildinfo ../*.changes ../*.dsc ../*.tar.xz ../*.tar.gz artifacts/deb/ || true
111+
# quick verify signatures (non-fatal)
112+
gpg --verify artifacts/deb/*.changes || true
113+
gpg --verify artifacts/deb/*.buildinfo || true
114+
- name: Sanitize Artifact name
115+
id: prep_artifact_name
116+
run: |
117+
# Use `sed` to replace invalid characters with a hyphen
118+
sanitized_distro_name=$(echo -n "${{ matrix.distro }}" | sed -e 's/[;\\\/:<>"|*?]/_/g' -e 's/__*/_/g')
119+
echo "artifact_name=binary-${sanitized_distro_name}" >> $GITHUB_ENV
120+
121+
- name: Upload .deb artifacts
122+
uses: actions/upload-artifact@v6
123+
with:
124+
path: artifacts/deb
125+
name: ${{ env.artifact_name }}
126+
- name: Publish to ZMREPO
127+
uses: easingthemes/ssh-deploy@main
128+
env:
129+
SSH_PRIVATE_KEY: ${{ secrets.ZMREPO_SSH_KEY }}
130+
ARGS: "-rltgoDzvO"
131+
SOURCE: artifacts/deb/
132+
REMOTE_HOST: ${{ secrets.ZMREPO_HOST }}
133+
REMOTE_USER: ${{ secrets.ZMREPO_SSH_USER }}
134+
TARGET: debian/proposed/mini-dinstall/incoming/
135+
136+
release:
137+
name: Create GitHub Release (on tag)
138+
needs: build-debian
139+
if: github.repository == 'ZoneMinder/zoneminder' && startsWith(github.ref, 'refs/tags/')
140+
runs-on: ubuntu-latest
141+
steps:
142+
- name: Download artifacts
143+
uses: actions/download-artifact@v7
144+
with:
145+
path: dist
146+
- name: Create release
147+
uses: softprops/action-gh-release@v2
148+
with:
149+
files: dist/**/*

0 commit comments

Comments
 (0)