bootc-deb/.forgejo/workflows/build-packages.yml
robojerk 1c74c5fe23
Some checks failed
Build Packages / Build libostree Backport (push) Failing after 1m37s
Build Packages / Build bootc Package (push) Has been skipped
Build Packages / Create Combined Artifacts (push) Has been skipped
Test Build / Test bootc Build (with existing libostree) (push) Failing after 51s
Remove all Node.js actions: use manual git clone and shell commands only
2025-07-21 00:27:17 +00:00

151 lines
No EOL
4.8 KiB
YAML

name: Build Packages
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
workflow_dispatch:
env:
UBUNTU_VERSION: "24.04"
OSTREE_VERSION: "2025.2"
BOOTC_VERSION: "1.5.1"
BACKPORT_SUFFIX: "~noble1"
jobs:
build-libostree-backport:
name: Build libostree Backport
runs-on: ubuntu-latest
container:
image: ubuntu:latest
steps:
- name: Setup build environment
run: |
apt update -y
apt install -y devscripts build-essential wget git
- name: Checkout repository manually
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/bootc-deb.git /tmp/bootc-deb
cp -r /tmp/bootc-deb/* .
cp -r /tmp/bootc-deb/.* . 2>/dev/null || true
- name: Add source repositories
run: |
echo "deb-src http://us.archive.ubuntu.com/ubuntu/ noble main universe" | tee /etc/apt/sources.list.d/noble-sources.list
apt update
- name: Create backport directory
run: |
mkdir -p /opt/Projects/ostree-backport-noble
cd /opt/Projects/ostree-backport-noble
- name: Download libostree source
run: |
cd /opt/Projects/ostree-backport-noble
POOL_URL="http://archive.ubuntu.com/ubuntu/pool/universe/o/ostree/"
wget "${POOL_URL}ostree_${OSTREE_VERSION}-1.dsc"
wget "${POOL_URL}ostree_${OSTREE_VERSION}.orig.tar.xz"
wget "${POOL_URL}ostree_${OSTREE_VERSION}-1.debian.tar.xz"
- name: Extract and modify source
run: |
cd /opt/Projects/ostree-backport-noble
dpkg-source -x "ostree_${OSTREE_VERSION}-1.dsc"
cd "ostree-${OSTREE_VERSION}"
dch --newversion "${OSTREE_VERSION}-1${BACKPORT_SUFFIX}" \
--distribution "noble-backports" \
-b \
"Backport libostree ${OSTREE_VERSION}-1 from Ubuntu questing for bootc compatibility."
- name: Install build dependencies
run: |
cd /opt/Projects/ostree-backport-noble/ostree-${OSTREE_VERSION}
apt build-dep ./
- name: Build libostree backport
run: |
cd /opt/Projects/ostree-backport-noble/ostree-${OSTREE_VERSION}
dpkg-buildpackage -us -uc -b
- name: List built packages
run: |
echo "Built libostree packages:"
ls -la /opt/Projects/ostree-backport-noble/*.deb
build-bootc:
name: Build bootc Package
runs-on: ubuntu-latest
container:
image: ubuntu:latest
needs: build-libostree-backport
steps:
- name: Setup build environment
run: |
apt update -y
apt install -y git cargo rustc pkg-config build-essential
- name: Checkout repository manually
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/bootc-deb.git /tmp/bootc-deb
cp -r /tmp/bootc-deb/* .
cp -r /tmp/bootc-deb/.* . 2>/dev/null || true
- name: Setup build environment for bootc
run: |
apt update -y
apt install -y git cargo rustc pkg-config build-essential
- name: Clone bootc source
run: |
git clone --depth 1 --branch v${BOOTC_VERSION} https://github.com/containers/bootc.git bootc-${BOOTC_VERSION}
cd bootc-${BOOTC_VERSION}
- name: Apply compatibility patch
run: |
cd bootc-${BOOTC_VERSION}
patch -p1 < ../bootc-libostree-compatibility.patch
- name: Copy debian packaging
run: |
cd bootc-${BOOTC_VERSION}
cp -r ../debian .
- name: Build bootc package
run: |
cd bootc-${BOOTC_VERSION}
dpkg-buildpackage -us -uc -b
- name: List built packages
run: |
echo "Built bootc packages:"
ls -la bootc-${BOOTC_VERSION}/../*.deb
create-artifacts:
name: Create Combined Artifacts
runs-on: ubuntu-latest
container:
image: ubuntu:latest
needs: [build-libostree-backport, build-bootc]
steps:
- name: Setup environment
run: |
apt update -y
apt install -y git
- name: Checkout repository manually
run: |
# Clone the repository manually instead of using actions/checkout
git clone https://git.raines.xyz/robojerk/bootc-deb.git /tmp/bootc-deb
cp -r /tmp/bootc-deb/* .
cp -r /tmp/bootc-deb/.* . 2>/dev/null || true
- name: Create combined artifacts
run: |
mkdir -p release-assets
echo "Creating release assets directory"
echo "Note: In a real setup, this would combine artifacts from previous jobs"
echo "For now, this is a placeholder for the artifact creation process"