Skip to content

Commit

Permalink
feat: Use custom container for package builds
Browse files Browse the repository at this point in the history
This will use a contianer with dependencies already installed. It is
published to ghcr.io/t2linux/fedora-kernel-build.

Merges #9
  • Loading branch information
sharpenedblade committed Jul 25, 2023
1 parent 1d448b2 commit 6194f04
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ jobs:
docker run -t --privileged \
-v "$PWD":/repo \
-e PACKAGE \
fedora:38 /bin/bash -c "/repo/build-packages.sh"
ghcr.io/t2linux/fedora-kernel-build:latest \
/repo/build-packages.sh
env:
PACKAGE: ${{ matrix.package }}

Expand Down Expand Up @@ -70,7 +71,8 @@ jobs:
docker run -t \
-v $PWD:/repo \
-e RPM_SIGNING_PRIVATE_KEY_B64 \
fedora:38 /bin/bash -c "/repo/sign-packages.sh"
ghcr.io/t2linux/fedora-kernel-build:latest \
/repo/sign-packages.sh
env:
RPM_SIGNING_PRIVATE_KEY_B64: ${{ secrets.RPM_SIGNING_PRIVATE_KEY_B64 }}

Expand Down
11 changes: 0 additions & 11 deletions build-packages.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,6 @@
#!/usr/bin/bash
source /repo/util.sh

# Install dependencies
dnf install -y --quiet koji git curl pesign rpmdevtools rpm-sign rpm-build mock zstd

# Optimize mock
echo 'config_opts["plugin_conf"]["package_state_enable"] = False
config_opts["macros"]["%_smp_mflags"] = "-j8"
config_opts["plugin_conf"]["ccache_opts"]["compress"] = True
config_opts["plugin_conf"]["root_cache_opts"]["compress_program"] = "zstd"
config_opts["plugin_conf"]["root_cache_opts"]["extension"] = ".zst"
config_opts["plugin_conf"]["hw_info_enable"] = False' > /etc/mock/site-defaults.cfg

cd /repo

if [ "$PACKAGE" == "kernel" ]; then
Expand Down
1 change: 0 additions & 1 deletion sign-packages.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#!/usr/bin/bash
source /repo/util.sh
dnf install --quiet -y rpm-sign rpmdevtools

cd /repo/_output
sign_packages $RPM_SIGNING_PRIVATE_KEY_B64 "T2Linux Fedora"

0 comments on commit 6194f04

Please sign in to comment.