diff --git a/.forgejo/workflows/build-libostree-backport.yml b/.forgejo/workflows/build-libostree-backport.yml index 2eb2861..4d60007 100644 --- a/.forgejo/workflows/build-libostree-backport.yml +++ b/.forgejo/workflows/build-libostree-backport.yml @@ -133,66 +133,27 @@ jobs: echo "" >> release-assets/INSTALL.md echo "Build completed on: $(date)" >> release-assets/INSTALL.md - - name: Create download page + - name: Install curl for package upload run: | - # Create a simple download page in the workspace - mkdir -p /workspace/robojerk/libostree-dev/downloads - cp -r release-assets/* /workspace/robojerk/libostree-dev/downloads/ - - # Create an index.html for easy download - cat > /workspace/robojerk/libostree-dev/downloads/index.html << EOF - - - - libostree-dev Downloads - - - -

libostree-dev 2025.2-1~noble1 Downloads

-

Build completed: $(date)

-

Ubuntu Version: ${UBUNTU_VERSION}

-

Ostree Version: ${OSTREE_VERSION}

- -

Available Packages:

- EOF - - ls -1 release-assets/*.deb 2>/dev/null | sed 's|.*/||' | while read package; do - size=$(ls -lh release-assets/"$package" | awk '{print $5}') - echo "
" >> /workspace/robojerk/libostree-dev/downloads/index.html - echo " $package ($size)
" >> /workspace/robojerk/libostree-dev/downloads/index.html - echo " Download" >> /workspace/robojerk/libostree-dev/downloads/index.html - echo "
" >> /workspace/robojerk/libostree-dev/downloads/index.html - done - - cat >> /workspace/robojerk/libostree-dev/downloads/index.html << EOF - -

Installation Instructions:

-
# Download and install the main package
-sudo dpkg -i libostree-dev_2025.2-1~noble1_amd64.deb
-sudo apt-get install -f
+          apt-get update -y
+          apt-get install -y curl
 
-# Verify installation
-pkg-config --modversion ostree-1
-# Should output: 2025.2
+ - 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..." -

Package Details:

- - - - EOF - - echo "Download page created at: /workspace/robojerk/libostree-dev/downloads/" - ls -la /workspace/robojerk/libostree-dev/downloads/ \ No newline at end of file + # Upload to Forgejo's Debian Package Registry using correct API + # PUT https://forgejo.example.com/api/packages/{owner}/debian/pool/{distribution}/{component}/upload + # Using Authorization: token header as per Forgejo documentation + curl -X PUT \ + -H "Authorization: token ${{ secrets.ACCESS_TOKEN }}" \ + -H "Content-Type: application/vnd.debian.binary-package" \ + --upload-file "$deb_file" \ + "https://git.raines.xyz/api/packages/robojerk/debian/pool/noble/main/upload" + + echo "Upload completed for $deb_file" + fi + done \ No newline at end of file diff --git a/README.md b/README.md index 085846d..db454b0 100644 --- a/README.md +++ b/README.md @@ -33,17 +33,22 @@ This repository contains the CI/CD workflow and scripts to build a backport of l **How to Download**: -### Option 1: Download Page (Recommended) -After each successful build, packages are available at: -**https://git.raines.xyz/robojerk/libostree-dev/raw/branch/main/downloads/** +### Option 1: Debian Package Registry (Recommended) +Packages are available in Forgejo's Debian Package Registry: -This page provides: -- Direct download links for all packages -- Package sizes and descriptions -- Installation instructions -- Build information +```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 -### Option 2: Direct Package Links +# 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 + +### Available Packages: - `libostree-dev_2025.2-1~noble1_amd64.deb` (105KB) - Main development package - `libostree-1-1_2025.2-1~noble1_amd64.deb` (355KB) - Runtime library - `ostree_2025.2-1~noble1_amd64.deb` (190KB) - Command line tools @@ -64,14 +69,18 @@ This page provides: ### Installation ```bash -# Option 1: Download and install from download page -wget https://git.raines.xyz/robojerk/libostree-dev/raw/branch/main/downloads/libostree-dev_2025.2-1~noble1_amd64.deb +# 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 -# Option 2: Visit the download page for all packages -# https://git.raines.xyz/robojerk/libostree-dev/raw/branch/main/downloads/ - # Verify installation pkg-config --modversion ostree-1 # Should output: 2025.2