-
Notifications
You must be signed in to change notification settings - Fork 8
56 lines (46 loc) · 1.44 KB
/
build-debian-package.yml
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
name: Build Debian Package
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build Debian package
run: |
sudo apt-get update
sudo apt-get install -y devscripts debhelper curl
# Ensure you have the necessary build dependencies
sudo apt-get build-dep .
# Build the Debian package
debuild -us -uc -b
- name: Create artifact directory
run: mkdir -p artifacts
- name: Move Debian package to artifact directory
run: mv ../*.deb artifacts/
- name: Test Debian package installation
run: |
sudo apt install -y pip python3-exif python3-progressbar exiftran python3-psutil
sudo pip install PyExifTool
sudo dpkg -i artifacts/*.deb
sudo systemctl enable photo-importer.service
sudo systemctl restart photo-importer.service
sudo systemctl status photo-importer.service
photo-importer -h
- name: Upload Debian package as artifact
uses: actions/upload-artifact@v4
with:
name: debian-package
path: artifacts/*.deb