-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee3921e
commit 73c6e94
Showing
7 changed files
with
164 additions
and
212 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Build Hyperion packages | ||
description: Builds Hyperion for specified distribution, codename and architecture | ||
inputs: | ||
distribution: | ||
description: Linux distribution to build | ||
required: true | ||
default: 'debian' | ||
codename: | ||
description: Linux codename to build | ||
required: true | ||
default: 'bullseye' | ||
architecture: | ||
description: Linux architecture to build | ||
required: false | ||
default: 'amd64' | ||
qtVersion: | ||
description: Qt version to be used | ||
required: false | ||
default: '6' | ||
ghcr: | ||
description: GitHub Container Registry (Repository) to be used | ||
required: false | ||
default: 'hyperion-project' | ||
dockerArchitecture: | ||
description: Docker architecture under which to build | ||
required: false | ||
default: 'linux/amd64' | ||
dockerEntrypoint: | ||
description: Docker Entrypoint | ||
required: false | ||
default: '' | ||
workingDirectory: | ||
description: Working directory | ||
required: false | ||
default: ${{ github.workspace }} | ||
runs: | ||
using: composite | ||
steps: | ||
- name: 👷 Building Hyperion | ||
shell: bash | ||
working-directory: ${{ inputs.workingDirectory }} | ||
run: | | ||
mkdir -p "deploy" | ||
VERSION=$(cat .version) | ||
if [[ ${{ inputs.distribution }} == @(debian|ubuntu) ]]; then | ||
docker run --rm --privileged --platform=${{ inputs.dockerArchitecture }} ${{ inputs.dockerEntrypoint }} \ | ||
-w "/source" \ | ||
-v "${{ inputs.workingDirectory }}/deploy:/deploy" \ | ||
-v "${{ inputs.workingDirectory }}:/source:rw" \ | ||
ghcr.io/${{ inputs.ghcr }}/${{ inputs.distribution }}:${{ inputs.qtVersion == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }} \ | ||
/bin/bash -c "git config --global --add safe.directory '*' && \ | ||
mkdir -p debian/source && echo '$([[ $VERSION == *-* ]] && echo "3.0 (quilt)" || echo "3.0 (native)")' > debian/source/format && echo 10 > debian/compat && \ | ||
dch --create --distribution ${{ inputs.codename }} --package 'hyperion' -v '$(echo ${VERSION})~${{ inputs.codename }}' '${{ github.event.commits[0].message }}' && \ | ||
cp -fr LICENSE debian/copyright && \ | ||
sed 's/@ARCHITECTURE@/${{ inputs.architecture }}/g; s/@STANDARDS_VERSION@/$(echo ${VERSION%[-+]*})/g' debian/control.in > debian/control && \ | ||
debuild -b -uc -us && \ | ||
cp ../hyperion_*.deb ./deploy" | ||
else | ||
docker run --rm --platform=${{ inputs.dockerArchitecture }} ${{ inputs.dockerEntrypoint }} \ | ||
-w "/root" \ | ||
-v "${{ inputs.workingDirectory }}/deploy:/deploy" \ | ||
-v "${{ inputs.workingDirectory }}:/root/hyperion.ng:rw" \ | ||
ghcr.io/${{ inputs.ghcr }}/${{ inputs.distribution }}:${{ inputs.qtVersion == '6' && format('{0}-qt6', inputs.codename) || inputs.codename }} \ | ||
/bin/bash -c "tar -czf rpmbuild/SOURCES/hyperion.ng.tar.gz hyperion.ng/ && \ | ||
cp -f hyperion.ng/rpmbuild/hyperion.spec.in rpmbuild/SPECS/hyperion.spec && \ | ||
rpmdev-bumpspec --comment='${{ github.event.commits[0].message }}' --userstring='${{ env.ACTOR }}' rpmbuild/SPECS/hyperion.spec && \ | ||
rpmbuild -ba --define 'hyperion_version $(echo ${VERSION} | sed s/-/~/g | sed s/+/^/g)' rpmbuild/SPECS/hyperion.spec --clean && \ | ||
cp -fv rpmbuild/RPMS/$(uname -m)/hyperion* /deploy" | ||
fi | ||
env: | ||
ACTOR: "Hyperion Project <[email protected]>" |
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
Oops, something went wrong.