-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake_image.sh
More file actions
executable file
·26 lines (19 loc) · 863 Bytes
/
make_image.sh
File metadata and controls
executable file
·26 lines (19 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/usr/bin/env bash
set -ex
c=$(buildah from gentoo/stage3)
buildcmd() {
buildah run --network host "${c}" -- "$@"
}
env | sort
buildcmd emerge-webrsync
buildcmd mkdir -p /etc/portage/package.use /repo
buildcmd bash -c 'echo "dev-vcs/git -perl" > /etc/portage/package.use/git'
buildcmd emerge --quiet-build -NDqu1 --exclude gcc @world
buildcmd emerge --quiet-build -q dev-vcs/git app-portage/repoman
# shellcheck disable=SC2016
buildcmd bash -c 'source /etc/portage/make.conf && rm "${DISTDIR}"/*'
buildcmd echo 'FEATURES="-ipc-sandbox -network-sandbox"' \| tee -a /etc/portage/make.conf
buildah config --entrypoint "/usr/bin/repoman" "${c}"
buildah config --workingdir "/repo" "${c}"
buildah commit --format=docker --squash --rm "${c}" "ghcr.io/${GITHUB_REPOSITORY_OWNER}/repoman:latest"
buildah push "ghcr.io/${GITHUB_REPOSITORY_OWNER}/repoman:latest"