From 7f512cfab41d46499589f8a28cf5a5696932c254 Mon Sep 17 00:00:00 2001 From: robojerk Date: Mon, 21 Jul 2025 03:51:42 +0000 Subject: [PATCH] feat: integrate Forgejo Debian Package Registry for professional distribution - Replace artifact upload with Debian Package Registry integration - Add automatic package upload to Forgejo's native Debian repository - Update README with apt repository installation instructions - Provide multiple download methods: apt repo, direct download, and artifacts - Enable users to install packages via standard apt commands - Improve package distribution with version control and deduplication This change transforms the package distribution from manual artifact downloads to a professional Debian repository that users can add to their apt sources. --- .../workflows/build-libostree-backport.yml | 27 +++++++++++- README.md | 42 ++++++++++++++----- 2 files changed, 58 insertions(+), 11 deletions(-) diff --git a/.forgejo/workflows/build-libostree-backport.yml b/.forgejo/workflows/build-libostree-backport.yml index 1a7e6ef..58907c7 100644 --- a/.forgejo/workflows/build-libostree-backport.yml +++ b/.forgejo/workflows/build-libostree-backport.yml @@ -131,4 +131,29 @@ jobs: done echo "" >> release-assets/INSTALL.md - echo "Build completed on: $(date)" >> release-assets/INSTALL.md \ No newline at end of file + echo "Build completed on: $(date)" >> release-assets/INSTALL.md + + - name: Upload to Debian Package Registry + run: | + # Upload each .deb package to Forgejo's Debian Package Registry + for deb_file in release-assets/*.deb; do + if [ -f "$deb_file" ]; then + echo "Uploading $deb_file to Debian Package Registry..." + # Extract package name and version + pkg_name=$(dpkg-deb -f "$deb_file" Package) + pkg_version=$(dpkg-deb -f "$deb_file" Version) + pkg_arch=$(dpkg-deb -f "$deb_file" Architecture) + + echo "Package: $pkg_name" + echo "Version: $pkg_version" + echo "Architecture: $pkg_arch" + + # Upload to Forgejo's Debian Package Registry + # This will be available at: https://git.raines.xyz/api/packages/robojerk/debian + curl -X POST \ + -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \ + -H "Content-Type: application/vnd.debian.binary-package" \ + --data-binary "@$deb_file" \ + "https://git.raines.xyz/api/packages/robojerk/debian/$pkg_name/$pkg_version/$pkg_arch" + fi + done \ No newline at end of file diff --git a/README.md b/README.md index 70bee23..dc79b94 100644 --- a/README.md +++ b/README.md @@ -25,19 +25,36 @@ This repository contains the CI/CD workflow and scripts to build a backport of l ### Download Links -**Latest Build**: Check the [Actions tab](https://git.raines.xyz/robojerk/libostree-dev/actions) for the most recent successful "Build libostree Backport" run. +**Latest Build**: [Build #2](https://git.raines.xyz/robojerk/libostree-dev/actions/runs/2) - Successfully completed **Available Packages**: - `libostree-dev_2025.2-1~noble1_amd64.deb` - `libostree-dev-dbgsym_2025.2-1~noble1_amd64.ddeb` **How to Download**: + +### Option 1: Debian Package Registry (Recommended) +Packages are available in Forgejo's Debian Package Registry: + +```bash +# Add the repository +echo "deb https://git.raines.xyz/api/packages/robojerk/debian/ noble main" | sudo tee /etc/apt/sources.list.d/libostree-dev.list + +# Update and install +sudo apt update +sudo apt install libostree-dev=2025.2-1~noble1 +``` + +### Option 2: Direct Download from Package Registry +Visit: https://git.raines.xyz/robojerk/libostree-dev/packages + +### Option 3: Manual Download from Actions 1. Go to the [Actions tab](https://git.raines.xyz/robojerk/libostree-dev/actions) -2. Find the latest successful "Build libostree Backport" run -3. Click on the run to view details -4. Scroll down to the "Artifacts" section -5. Download the `release-assets` artifact -6. Extract the .deb files from the archive +2. Look for the most recent successful "Build libostree Backport" workflow run +3. Click on the workflow run (it should show "Successful" status) +4. Look for the "Artifacts" section at the bottom of the page +5. Download the `libostree-packages` artifact (it will be a .zip file) +6. Extract the .zip file to get the .deb packages **Quick Download Scripts**: ```bash @@ -51,10 +68,15 @@ This repository contains the CI/CD workflow and scripts to build a backport of l ### Installation ```bash -# Download and install the package -# 1. Visit: https://git.raines.xyz/robojerk/libostree-dev/actions/runs/97 -# 2. Download the release-assets artifact -# 3. Extract and install: +# Option 1: Install via Debian Package Registry (Recommended) +echo "deb https://git.raines.xyz/api/packages/robojerk/debian/ noble main" | sudo tee /etc/apt/sources.list.d/libostree-dev.list +sudo apt update +sudo apt install libostree-dev=2025.2-1~noble1 + +# Option 2: Manual download and install +# 1. Visit: https://git.raines.xyz/robojerk/libostree-dev/packages +# 2. Download libostree-dev_2025.2-1~noble1_amd64.deb +# 3. Install: sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb sudo apt-get install -f # Install any missing dependencies ```