Compare commits

...

5 commits
main ... v0.0.5

Author SHA1 Message Date
7a3a048e76 add dch
Some checks failed
Build and Deploy Debian Package / build-package (push) Failing after 55s
2025-01-28 19:25:11 +01:00
4ccc666299 remove old package
Some checks failed
Build and Deploy Debian Package / build-package (push) Failing after 1m0s
2025-01-28 19:17:41 +01:00
d6890b19e3 back to ubuntu
Some checks failed
Build and Deploy Debian Package / build-package (push) Failing after 21s
2025-01-28 19:15:24 +01:00
d72596fe04 replace image
Some checks failed
Build and Deploy Debian Package / build-package (push) Failing after 16s
2025-01-28 19:11:01 +01:00
7c218fc664 add build workflow
Some checks failed
Build and Deploy Debian Package / build-package (push) Failing after 20s
2025-01-28 19:02:32 +01:00
7 changed files with 75 additions and 0 deletions

View file

@ -0,0 +1,52 @@
name: Build and Deploy Debian Package
on:
push:
tags:
- '*'
jobs:
build-package:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Parse distribution
run: |
if [[ "$GITHUB_REF_NAME" == *"@stable"* ]]; then
echo "DISTRO=stable" >> $GITHUB_ENV
else
echo "DISTRO=unstable" >> $GITHUB_ENV
fi
- name: Setup Debian Packaging
run: |
sudo apt-get update
sudo apt-get install -y devscripts debhelper dh-python dpkg-dev jq build-essential
- name: Generate dynamic changelog
run: |
mkdir -p debian # Ensure the debian directory exists
sed -e "s/{{VERSION}}/${{ steps.version.outputs.DEB_VERSION }}/g" \
-e "s/{{TAG}}/$GITHUB_REF_NAME/g" \
debian/changelog.in > debian/changelog
cat debian/changelog # Debugging: Print the generated changelog
- name: Build Debian Package
run: |
debuild -us -uc -b
- name: Upload to Forgejo Debian Registry
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
PACKAGE_NAME="magicfw_0.1.0-1_all.deb" # Update version accordingly
DISTRO="debian" # e.g., bullseye, bookworm
COMPONENT="main"
curl --user "your_username:$FORGEJO_TOKEN" \
--upload-file ../${PACKAGE_NAME} \
"https://git.marcorealacci.me/api/packages/${{ github.repository_owner }}/debian/pool/${DISTRO}/${COMPONENT}/${PACKAGE_NAME}"

5
debian/changelog.in vendored Normal file
View file

@ -0,0 +1,5 @@
magicfw ({{VERSION}}) unstable; urgency=medium
* Automatic release from Git tag {{TAG}}
-- Auto Release Bot <ci@forgejo> $(date -R)

12
debian/control vendored Normal file
View file

@ -0,0 +1,12 @@
Source: magicfw
Section: utils
Priority: optional
Maintainer: Marco Realacci <marco@marcorealacci.me>
Build-Depends: debhelper-compat (= 13), dh-python, python3-all
Standards-Version: 4.6.0
Package: magicfw
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}
Description: A magic firewall service
Automatic build from Git tag ${TAG}.

2
debian/install vendored Normal file
View file

@ -0,0 +1,2 @@
src/main.py usr/bin/
systemd/magicfw.service lib/systemd/system/

3
debian/rules vendored Normal file
View file

@ -0,0 +1,3 @@
#!/usr/bin/make -f
%:
dh $@ --with python3,systemd --buildsystem=pybuild

1
debian/source/format vendored Normal file
View file

@ -0,0 +1 @@
3.0 (quilt)