summaryrefslogtreecommitdiff
path: root/.forgejo/workflows
diff options
context:
space:
mode:
authorJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2026-02-19 15:53:29 +0100
committerJeroen Wijenbergh <jeroen.wijenbergh@geant.org>2026-02-20 15:00:41 +0100
commit9f62267456332c5d6acff1e343870729cf23345a (patch)
tree0ec67f59a7b3d98dc9690f7288e34e619fd94008 /.forgejo/workflows
parentd37c61e828f2c428b08bea06062dc4f55d410a1e (diff)
Debian: Initial package building in upstream repo
Diffstat (limited to '.forgejo/workflows')
-rw-r--r--.forgejo/workflows/deb.yml53
1 files changed, 53 insertions, 0 deletions
diff --git a/.forgejo/workflows/deb.yml b/.forgejo/workflows/deb.yml
new file mode 100644
index 0000000..7e0b2dd
--- /dev/null
+++ b/.forgejo/workflows/deb.yml
@@ -0,0 +1,53 @@
+name: Build Deb Packages
+
+on:
+ push:
+ branches:
+ - '**'
+ release:
+ types: [published]
+
+jobs:
+ build-deb:
+ name: Deb build for ${{ matrix.image }} ${{ matrix.arch }}
+ strategy:
+ matrix:
+ image:
+ - "debian:bookworm"
+ - "debian:trixie"
+ - "ubuntu:jammy"
+ - "ubuntu:noble"
+ - "ubuntu:plucky"
+ - "ubuntu:questing"
+ # Add arm64 here for ARM builds
+ arch:
+ - "amd64"
+ runs-on: codeberg-small-lazy
+ container:
+ image: codeberg.org/jwijenbergh/debbuilder-${{ matrix.image }}-${{ matrix.arch }}
+ steps:
+ - name: Checkout Repository
+ run: git clone --depth 1 -b ${{ github.ref_name }} ${{ github.server_url }}/${{ github.repository }} common
+
+ - name: Install build dependencies
+ run: |
+ cd common
+ sudo apt-get update
+ sudo apt-get build-dep -y .
+
+ - name: Build Deb package
+ run: |
+ cd common
+ dpkg-buildpackage -us -uc
+
+ - name: Upload Deb
+ if: github.event_name == 'release' && secrets.PACKAGE_TOKEN != ''
+ run: |
+ OWNER="${{ github.repository_owner }}"
+ CODENAME="$(lsb_release -cs)"
+ for DEB in $(find . -type f -name "*.deb"); do
+ echo "uploading Deb: ${DEB}"
+ curl --user "${OWNER}:${{ secrets.PACKAGE_TOKEN }}" \
+ --upload-file "${DEB}" \
+ "${{ github.server_url }}/api/packages/${OWNER}/debian/pool/${CODENAME}/main/upload?sign=true"
+ done