This repository was archived by the owner on Sep 6, 2026. It is now read-only.
Repository navigation
Build and Release Podman Suite for Ubuntu 26.04 #64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and Release Podman 5.x Suite for Ubuntu 26.04 | |
| on: | |
| schedule: | |
| - cron: '0 8 * * *' # Runs daily at 08:00 UTC | |
| workflow_dispatch: # Allows manual trigger | |
| permissions: | |
| contents: write # Required to create GitHub Releases and Tags | |
| jobs: | |
| build-debs: | |
| name: Build ${{ matrix.package }} | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ubuntu:26.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| package: | |
| - podman | |
| - buildah | |
| - skopeo | |
| - crun | |
| - conmon | |
| - netavark | |
| - aardvark-dns | |
| - cni-plugins | |
| - containers-common | |
| - podman-compose | |
| - podman-tui | |
| - passt | |
| - slirp4netns | |
| - composefs | |
| - ramalama | |
| steps: | |
| - name: Install Build Toolchain & Dependencies | |
| run: | | |
| apt-get update | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y \ | |
| git curl wget jq build-essential pkg-config libsystemd-dev libglib2.0-dev libseccomp-dev \ | |
| libapparmor-dev libdevmapper-dev libbtrfs-dev libgpgme-dev libyajl-dev libfuse3-dev \ | |
| go-md2man iptables uidmap ruby ruby-dev libcap-dev libslirp-dev libprotobuf-c-dev \ | |
| python3-pip python3-setuptools python3-wheel python3-build python3-installer python-is-python3 \ | |
| python3-argcomplete \ | |
| golang cargo rustc meson ninja-build m4 automake autoconf libtool libssl-dev | |
| gem install fpm --no-document | |
| - name: Fetch Latest Git Tag | |
| id: fetch_tag | |
| run: | | |
| # Route custom repo names to their actual Git URLs | |
| case "${{ matrix.package }}" in | |
| cni-plugins) REPO_URL="https://github.com/containernetworking/plugins.git" ;; | |
| passt) REPO_URL="https://passt.top/passt" ;; | |
| slirp4netns) REPO_URL="https://github.com/rootless-containers/slirp4netns.git" ;; | |
| containers-common) REPO_URL="https://github.com/containers/common.git" ;; | |
| *) REPO_URL="https://github.com/containers/${{ matrix.package }}.git" ;; | |
| esac | |
| # Fetch tags via git, ignoring release candidates/alphas | |
| if [ "${{ matrix.package }}" = "passt" ]; then | |
| RAW_TAG=$(git ls-remote --tags "$REPO_URL" | grep -v '\^{}$' | awk -F/ '{print $3}' | sort -r | head -n1) | |
| else | |
| RAW_TAG=$(git ls-remote --tags --refs "$REPO_URL" | grep -v '\^{}$' | awk -F/ '{print $3}' | grep -i -v -E 'rc|beta|alpha' | sort -V | tail -n1) | |
| fi | |
| if [ -z "$RAW_TAG" ]; then | |
| echo "Failed to fetch tag for ${{ matrix.package }}" | |
| exit 1 | |
| fi | |
| echo "Raw tag found: $RAW_TAG" | |
| # Strip 'v' prefix and convert '_' to '.' (Crucial for Passt / Debian compliance) | |
| CLEAN_VERSION=$(echo "$RAW_TAG" | sed 's/^v//' | tr '_' '.') | |
| echo "version=$CLEAN_VERSION" >> $GITHUB_ENV | |
| echo "tag=$RAW_TAG" >> $GITHUB_ENV | |
| echo "repo_url=$REPO_URL" >> $GITHUB_ENV | |
| - name: Check if Release Exists | |
| id: check_release | |
| run: | | |
| STATUS=$(curl -s -o /dev/null -w "%{http_code}" -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
| https://api.github.com/repos/${{ github.repository }}/releases/tags/${{ matrix.package }}-${{ env.version }}) | |
| if [ "$STATUS" = "200" ]; then | |
| echo "Release already exists. Skipping build." | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Clone Repository | |
| if: steps.check_release.outputs.skip != 'true' | |
| run: | | |
| git clone --recursive --branch ${{ env.tag }} ${{ env.repo_url }} build_dir | |
| - name: Compile and Install to Temporary Directory | |
| if: steps.check_release.outputs.skip != 'true' | |
| run: | | |
| # Bypass Ubuntu PEP 668 restriction preventing pip installations | |
| export PIP_BREAK_SYSTEM_PACKAGES=1 | |
| # Force GCC 14 to use C17 standard instead of C23 to prevent header errors in crun | |
| export CFLAGS="-std=gnu17 -g -O2" | |
| cd build_dir | |
| mkdir -p dest | |
| if [ "${{ matrix.package }}" = "podman" ]; then | |
| make BUILDTAGS="seccomp systemd apparmor" PREFIX=/usr | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "buildah" ]; then | |
| make BUILDTAGS="seccomp apparmor" PREFIX=/usr | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "skopeo" ]; then | |
| make BUILDTAGS="seccomp" bin/skopeo | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "crun" ]; then | |
| ./autogen.sh | |
| ./configure --prefix=/usr | |
| make | |
| make install DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "conmon" ]; then | |
| make | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "netavark" ] || [ "${{ matrix.package }}" = "aardvark-dns" ]; then | |
| make | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "cni-plugins" ]; then | |
| ./build_linux.sh | |
| mkdir -p dest/opt/cni/bin | |
| cp bin/* dest/opt/cni/bin/ | |
| elif [ "${{ matrix.package }}" = "containers-common" ]; then | |
| make | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "podman-compose" ]; then | |
| pip3 install . --root=$(pwd)/dest --prefix=/usr --ignore-installed --no-compile | |
| elif [ "${{ matrix.package }}" = "podman-tui" ]; then | |
| make | |
| mkdir -p dest/usr/bin | |
| cp bin/podman-tui dest/usr/bin/ | |
| elif [ "${{ matrix.package }}" = "passt" ]; then | |
| make | |
| make install prefix=/usr DESTDIR=$(pwd)/dest | |
| # Add AppArmor profiles for Ubuntu userns compatibility | |
| mkdir -p $(pwd)/dest/etc/apparmor.d/abstractions | |
| cp contrib/apparmor/usr.bin.passt $(pwd)/dest/etc/apparmor.d/ | |
| cp contrib/apparmor/usr.bin.pasta $(pwd)/dest/etc/apparmor.d/ | |
| cp contrib/apparmor/abstractions/passt $(pwd)/dest/etc/apparmor.d/abstractions/ | |
| elif [ "${{ matrix.package }}" = "slirp4netns" ]; then | |
| ./autogen.sh | |
| ./configure --prefix=/usr | |
| make | |
| make install DESTDIR=$(pwd)/dest | |
| elif [ "${{ matrix.package }}" = "composefs" ]; then | |
| meson setup build --prefix=/usr | |
| ninja -C build | |
| DESTDIR=$(pwd)/dest ninja -C build install | |
| elif [ "${{ matrix.package }}" = "ramalama" ]; then | |
| make | |
| make install PREFIX=/usr DESTDIR=$(pwd)/dest | |
| fi | |
| - name: Build .deb Package | |
| if: steps.check_release.outputs.skip != 'true' | |
| run: | | |
| cd build_dir/dest | |
| fpm -s dir -t deb \ | |
| -n "${{ matrix.package }}" \ | |
| -v "${{ env.version }}" \ | |
| -p "../${{ matrix.package }}-${{ env.version }}.deb" \ | |
| * | |
| - name: Upload .deb Artifacts | |
| if: steps.check_release.outputs.skip != 'true' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.package }}-${{ env.version }} | |
| path: build_dir/*.deb | |
| - name: Create GitHub Release | |
| if: steps.check_release.outputs.skip != 'true' | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ matrix.package }}-${{ env.version }} | |
| name: ${{ matrix.package }} ${{ env.version }} | |
| files: build_dir/*.deb | |
| body: "Automated build of ${{ matrix.package }} version ${{ env.version }} for Ubuntu 26.04." | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |