Files
zoitechat/.github/workflows/solus-eopkg-build.yml
2026-02-04 09:31:40 -07:00

61 lines
1.8 KiB
YAML

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: "ghcr.io/getsolus/solus:latest"
push:
branches:
- main
- master
jobs:
build-eopkg:
runs-on: ubuntu-latest
env:
SOLUS_IMAGE: ${{ inputs.solus_image || 'ghcr.io/getsolus/solus:latest' }}
PACKAGE_YML: ${{ inputs.package_yml || 'packaging/solus/package.yml' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- 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
docker pull "$SOLUS_IMAGE"
docker run --rm \
-v "$PWD":/workspace \
-w /workspace \
-e PACKAGE_YML="$PACKAGE_YML" \
"$SOLUS_IMAGE" \
sh -lc '
set -euo pipefail
eopkg update-repo -y
eopkg install -y ypkg git
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