mirror of
https://github.com/JasonN3/build-container-installer.git
synced 2025-12-25 19:07:54 +01:00
35 lines
602 B
Bash
35 lines
602 B
Bash
#!/bin/bash
|
|
|
|
set -ex
|
|
|
|
for entry in $@
|
|
do
|
|
export $entry
|
|
done
|
|
|
|
if [[ -d /cache/skopeo ]]
|
|
then
|
|
ln -s /cache/skopeo /build-container-installer/container
|
|
fi
|
|
|
|
if [[ ! -d /cache/dnf ]]
|
|
then
|
|
mkdir /cache/dnf
|
|
fi
|
|
|
|
# Pull container
|
|
make container/${IMAGE_NAME}-${IMAGE_TAG} $@
|
|
|
|
# Build base ISO
|
|
make boot.iso DNF_CACHE=/cache/dnf $@
|
|
|
|
# Add container to ISO
|
|
make build/deploy.iso $@
|
|
|
|
# Make output dir in github workspace
|
|
mkdir /github/workspace/build || true
|
|
|
|
# Copy resulting iso to github workspace and fix permissions
|
|
cp build/deploy.iso /github/workspace/build
|
|
chmod -R ugo=rwX /github/workspace/build
|
|
|