Compare commits

...

24 commits
main ... v0.1.3

Author SHA1 Message Date
7e7dd05276 add python dependencies
All checks were successful
Build and Publish Debian Package / build (push) Successful in 38s
2025-03-15 03:16:12 +01:00
3201ac7be6 set python3 instead of python
All checks were successful
Build and Publish Debian Package / build (push) Successful in 40s
2025-03-15 03:10:48 +01:00
c7578c1fc8 fix version generation
All checks were successful
Build and Publish Debian Package / build (push) Successful in 38s
2025-03-15 03:07:50 +01:00
aa12d23858 update CI
Some checks failed
Build and Publish Debian Package / build (push) Failing after 33s
2025-03-15 03:03:57 +01:00
ac5e859977 release 2025-03-15 03:01:53 +01:00
0a7a3f70eb rename package
All checks were successful
Build and Publish Debian Package / build (push) Successful in 39s
2025-03-15 02:54:49 +01:00
063ea9b64b Aggiorna .forgejo/workflows/build.yml
All checks were successful
Build and Publish Debian Package / build (push) Successful in 39s
2025-03-15 02:50:36 +01:00
409ad256f0 Aggiorna .forgejo/workflows/build.yml
Some checks failed
Build and Publish Debian Package / build (push) Failing after 37s
2025-03-15 02:48:59 +01:00
2ad4a88382 Aggiorna .forgejo/workflows/build.yml
Some checks failed
Build and Publish Debian Package / build (push) Failing after 34s
2025-03-15 02:47:50 +01:00
dd5ee5c832 Aggiorna .forgejo/workflows/build.yml
All checks were successful
Build and Publish Debian Package / build (push) Successful in 39s
2025-03-15 02:37:29 +01:00
a5db9d457d Aggiorna .forgejo/workflows/build.yml
Some checks failed
Build and Publish Debian Package / build (push) Has been cancelled
2025-03-15 02:36:00 +01:00
b7aaf2253b Aggiorna .forgejo/workflows/build.yml
Some checks failed
Build and Publish Debian Package / build (push) Failing after 1m26s
2025-03-15 02:31:09 +01:00
d55391bf15 Trigger CI 2025-03-15 02:30:31 +01:00
5524987beb test 2025-03-15 02:12:34 +01:00
bf1e27cad3 test 2025-03-15 02:11:33 +01:00
f1a0ef62d2 Trigger CI 2025-03-15 02:10:49 +01:00
bcb21618a2 Aggiorna README.md 2025-03-15 02:06:46 +01:00
0951031c35 Aggiorna .forgejo/workflows/build-debian-package.yml 2025-03-15 02:06:08 +01:00
4d52e80b0f Aggiorna .forgejo/workflows/build-debian-package.yml 2025-03-15 02:03:42 +01:00
d95c49a1c4 Aggiorna .forgejo/workflows/build-debian-package.yml 2025-03-15 02:02:38 +01:00
25af0cff8b Aggiorna .forgejo/workflows/build-debian-package.yml 2025-03-15 02:01:50 +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
4 changed files with 76 additions and 2 deletions

View file

@ -0,0 +1,73 @@
name: Build and Publish Debian Package
#on: [push]
on:
push:
tags:
- "v*"
env:
DISTRIBUTION: bookworm
COMPONENT: main
jobs:
build:
runs-on: docker
container:
image: catthehacker/ubuntu:act-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# - name: Debug file structure
# run: ls -R
# - name: Debug pwd
# run: pwd
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.13'
- name: Install FPM dependencies
run: |
sudo apt-get update
sudo apt-get install -y ruby ruby-dev build-essential
sudo gem install --no-document fpm
- name: Prepare package structure
run: |
# Create temporary packaging directory
mkdir -p package/usr/local/bin
mkdir -p package/etc/systemd/system
# Copy magicfw.py as the executable and rename if needed
cp src/magicfw.py package/usr/local/bin/magicfw
chmod +x package/usr/local/bin/magicfw
# Copy the systemd service file
cp systemd/magicfw.service package/etc/systemd/system/
- name: Generate version number
run: |
VERSION=$(git describe --tags --abbrev=0 2>/dev/null | sed 's/^v//')
echo "VERSION=$VERSION" >> $GITHUB_ENV
- name: Build Debian package with FPM
run: |
# The -s dir option tells FPM the source is a directory.
# The -t deb option builds a deb package.
# -n is the package name and -v the version.
fpm -s dir -t deb -n magicfw-docker -v $VERSION -C package \
-d "python3" \
-d "python3-docker"
- name: Upload to Forgejo Debian Registry
env:
FORGEJO_TOKEN: ${{ secrets.FORGEJO_TOKEN }}
run: |
PACKAGE_NAME="magicfw-docker_${VERSION}_amd64.deb" # Update version accordingly
curl --user "your_username:$FORGEJO_TOKEN" \
--upload-file ./${PACKAGE_NAME} \
"https://git.marcorealacci.me/api/packages/${{ github.repository_owner }}/debian/pool/${{env.DISTRIBUTION}}/${{env.COMPONENT}}/upload"

View file

@ -1,4 +1,4 @@
# Docker Magic Firewall Service: README.md
# Docker Magic Firewall Service
## Project Overview

View file

@ -1,3 +1,4 @@
#!/usr/bin/env python3
import os
import json
import logging

View file

@ -10,7 +10,7 @@ StartLimitBurst=10
Type=exec
Restart=on-failure
RestartSec=5s
ExecStart=/usr/bin/python3 /opt/docker_magicfw.py
ExecStart=/usr/local/bin/magicfw
# Environment variables (customize as needed)
Environment=LOG_LEVEL=INFO