docker-magic-firewall/.forgejo/workflows/build-debian-package.yml
Marco Realacci d72596fe04
Some checks failed
Build and Deploy Debian Package / build-package (push) Failing after 16s
replace image
2025-01-28 19:11:01 +01:00

56 lines
No EOL
1.5 KiB
YAML

name: Build and Deploy Debian Package
on:
push:
tags:
- '*'
jobs:
build-package:
runs-on: docker
container:
image: debian:bookworm
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Debian Packaging
run: |
apt-get update
apt-get install -y \
devscripts \
debhelper \
dh-python \
python3-all \
build-essential \
git \
curl
- 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 dh-systemd build-essential
- 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}"