Compare commits
2 commits
Author | SHA1 | Date | |
---|---|---|---|
733c53899d | |||
a3a621acd5 |
8 changed files with 1 additions and 91 deletions
|
@ -1,67 +0,0 @@
|
|||
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: |
|
||||
VERSION=${{ steps.version.outputs.DEB_VERSION }}
|
||||
DISTRIBUTION=$DISTRO
|
||||
|
||||
# Configura dch per generare il changelog
|
||||
dch --create \
|
||||
--package magicfw \
|
||||
--newversion "$VERSION" \
|
||||
--distribution "$DISTRIBUTION" \
|
||||
"Automatic release from Git tag ${GITHUB_REF_NAME}"
|
||||
|
||||
# Debug: Mostra il contenuto del changelog generato
|
||||
cat debian/changelog
|
||||
|
||||
# - 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}"
|
|
@ -1,4 +1,4 @@
|
|||
# Docker Magic Firewall Service: README.md
|
||||
# Docker Magic Firewall
|
||||
|
||||
## Project Overview
|
||||
|
||||
|
|
5
debian/changelog.in
vendored
5
debian/changelog.in
vendored
|
@ -1,5 +0,0 @@
|
|||
magicfw ({{VERSION}}) unstable; urgency=medium
|
||||
|
||||
* Automatic release from Git tag {{TAG}}
|
||||
|
||||
-- Auto Release Bot <ci@forgejo> $(date -R)
|
12
debian/control
vendored
12
debian/control
vendored
|
@ -1,12 +0,0 @@
|
|||
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
2
debian/install
vendored
|
@ -1,2 +0,0 @@
|
|||
src/main.py usr/bin/
|
||||
systemd/magicfw.service lib/systemd/system/
|
3
debian/rules
vendored
3
debian/rules
vendored
|
@ -1,3 +0,0 @@
|
|||
#!/usr/bin/make -f
|
||||
%:
|
||||
dh $@ --with python3,systemd --buildsystem=pybuild
|
1
debian/source/format
vendored
1
debian/source/format
vendored
|
@ -1 +0,0 @@
|
|||
3.0 (quilt)
|
Loading…
Reference in a new issue