Initial commit: Complete bootc packaging with CI/CD automation
Some checks failed
Build Packages / Build libostree Backport (push) Failing after 0s
Build Packages / Build bootc Package (push) Has been skipped
Test Build / Test bootc Build (with existing libostree) (push) Failing after 0s
Build Packages / Create Release (push) Has been skipped
Build Packages / Create Artifacts for README Update (push) Has been skipped
Some checks failed
Build Packages / Build libostree Backport (push) Failing after 0s
Build Packages / Build bootc Package (push) Has been skipped
Test Build / Test bootc Build (with existing libostree) (push) Failing after 0s
Build Packages / Create Release (push) Has been skipped
Build Packages / Create Artifacts for README Update (push) Has been skipped
This commit is contained in:
commit
695714a60e
15 changed files with 1545 additions and 0 deletions
172
.forgejo/workflows/build-packages.yml
Normal file
172
.forgejo/workflows/build-packages.yml
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
name: Build Packages
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main, master ]
|
||||
pull_request:
|
||||
branches: [ main, master ]
|
||||
release:
|
||||
types: [ published ]
|
||||
|
||||
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-24.04
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup build environment
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y devscripts build-essential wget
|
||||
|
||||
- name: Add source repositories
|
||||
run: |
|
||||
echo "deb-src http://us.archive.ubuntu.com/ubuntu/ noble main universe" | sudo tee /etc/apt/sources.list.d/noble-sources.list
|
||||
sudo 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}
|
||||
sudo apt build-dep ./
|
||||
|
||||
- name: Build libostree backport
|
||||
run: |
|
||||
cd /opt/Projects/ostree-backport-noble/ostree-${OSTREE_VERSION}
|
||||
dpkg-buildpackage -us -uc -b
|
||||
|
||||
- name: Upload libostree artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: libostree-backport-packages
|
||||
path: /opt/Projects/ostree-backport-noble/*.deb
|
||||
retention-days: 30
|
||||
|
||||
build-bootc:
|
||||
name: Build bootc Package
|
||||
runs-on: ubuntu-24.04
|
||||
needs: build-libostree-backport
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Download libostree artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: libostree-backport-packages
|
||||
path: /tmp/libostree-packages
|
||||
|
||||
- name: Install libostree backport
|
||||
run: |
|
||||
sudo dpkg -i /tmp/libostree-packages/*.deb || true
|
||||
sudo apt --fix-broken install -y
|
||||
|
||||
- name: Setup build environment
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo 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: Upload bootc artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: bootc-packages
|
||||
path: bootc-${BOOTC_VERSION}/../*.deb
|
||||
retention-days: 30
|
||||
|
||||
create-release:
|
||||
name: Create Release
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build-libostree-backport, build-bootc]
|
||||
if: github.event_name == 'release'
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: /tmp/artifacts
|
||||
|
||||
- name: Create release assets
|
||||
run: |
|
||||
mkdir -p release-assets
|
||||
cp /tmp/artifacts/libostree-backport-packages/*.deb release-assets/
|
||||
cp /tmp/artifacts/bootc-packages/*.deb release-assets/
|
||||
|
||||
- name: Upload release assets
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-assets
|
||||
path: release-assets/
|
||||
retention-days: 90
|
||||
|
||||
create-artifacts-for-readme:
|
||||
name: Create Artifacts for README Update
|
||||
runs-on: ubuntu-24.04
|
||||
needs: [build-libostree-backport, build-bootc]
|
||||
if: github.event_name != 'release'
|
||||
steps:
|
||||
- name: Download all artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: /tmp/artifacts
|
||||
|
||||
- name: Create combined artifacts
|
||||
run: |
|
||||
mkdir -p release-assets
|
||||
cp /tmp/artifacts/libostree-backport-packages/*.deb release-assets/ 2>/dev/null || true
|
||||
cp /tmp/artifacts/bootc-packages/*.deb release-assets/ 2>/dev/null || true
|
||||
|
||||
- name: Upload combined artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-assets
|
||||
path: release-assets/
|
||||
retention-days: 30
|
||||
Loading…
Add table
Add a link
Reference in a new issue