name: Solus eopkg build on: workflow_dispatch: inputs: package_yml: description: "Path to Solus package.yml for ypkg build" required: false default: "packaging/solus/package.yml" solus_image: description: "Solus container image" required: false default: "docker.io/silkeh/solus:latest" push: branches: - main - master permissions: contents: read packages: read jobs: build-eopkg: runs-on: ubuntu-latest env: SOLUS_IMAGE: ${{ inputs.solus_image || 'docker.io/silkeh/solus:latest' }} PACKAGE_YML: ${{ inputs.package_yml || 'packaging/solus/package.yml' }} steps: - name: Checkout uses: actions/checkout@v4 - name: Log in to GHCR (for ghcr.io images) if: startsWith(env.SOLUS_IMAGE, 'ghcr.io/') uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }} - name: Build eopkg package in Solus container run: | if [ ! -f "$PACKAGE_YML" ]; then echo "Expected Solus packaging file at $PACKAGE_YML" >&2 echo "Available package.yml files:" >&2 find . -name "package.yml" -print >&2 || true echo "Add a package.yml (ypkg) file or update the workflow input PACKAGE_YML." >&2 exit 1 fi if ! docker pull "$SOLUS_IMAGE"; then echo "Failed to pull SOLUS_IMAGE=$SOLUS_IMAGE" >&2 echo "Set workflow input 'solus_image' to a valid image that provides eopkg/ypkg." >&2 exit 1 fi docker run --rm \ -v "$PWD":/workspace \ -w /workspace \ -e PACKAGE_YML="$PACKAGE_YML" \ "$SOLUS_IMAGE" \ sh -lc ' set -euo pipefail eopkg update-repo -y # Do not remove openssl-11 here: it can trigger a very large # dependency cascade (including python3/eopkg itself), which # breaks the build environment before package build starts. # Some Solus base images still contain openssl-11 files that # conflict with openssl 3.x when the package set is refreshed. # Allowing file-conflict resolution keeps the CI image usable # long enough to install ypkg and complete the package build. # The base image does not guarantee Meson toolchain packages, # while our package.yml setup phase calls meson directly. # Install the essential build tools up front to avoid # `/tmp/ypkg-setup*: meson: command not found` failures. eopkg install -y --ignore-file-conflicts \ ypkg git meson ninja pkgconfig gcc gettext ypkg build "$PACKAGE_YML" mkdir -p /workspace/artifacts find . -maxdepth 3 -name "*.eopkg" -type f -exec cp -v {} /workspace/artifacts/ \; ' - name: Upload eopkg artifacts uses: actions/upload-artifact@v4 with: name: solus-eopkg path: artifacts/*.eopkg if-no-files-found: error