Skip to content

Commit 082cf5b

Browse files
committed
bump
1 parent 2b029c4 commit 082cf5b

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/generic_build.yml

+34
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,37 @@ jobs:
6464
image_id="$( cat "${iidfile}" )"
6565
rm "${iidfile}"
6666
67+
# Extract various package info and version info to store as labels
68+
container="$( buildah from "${image_id}" )"
69+
run() { buildah run "${container}" "${@}" ; }
70+
deb_list="$( run cat /.deb.lst | tr '\n' '|' | sed 's/|$//' )"
71+
pkg_list="$( run cat /.pkg.lst | tr '\n' '|' | sed 's/|$//' )"
72+
glibc="$( run sh -c 'exec "$( find -xdev -name libc.so.6 -print -quit )"' | sed '1!d' )"
73+
debian="$( run cat /etc/debian_version | sed '1!d' )"
74+
bash="$( run bash --version | sed '1!d' )"
75+
buildah rm "${container}"
76+
77+
# Store package/version info as labels for the image
78+
container="$( buildah from "${image_id}" )"
79+
buildah config \
80+
--label=glibc="${glibc}" \
81+
--label=debian="${debian}" \
82+
--label=bash="${bash}" \
83+
--label=deb-list="${deb_list}" \
84+
--label=pkg-list="${pkg_list}" \
85+
"${container}"
86+
87+
# Store the new image (now with labels)
88+
image_id="$( buildah commit "${container}" )"
89+
buildah rm "${container}"
90+
91+
# image tag includes arch; then added to manifest which does not include arch
92+
for tag in ${tags} ; do
93+
buildah tag \
94+
"${image_id}" \
95+
"${image_name}:${tag}-${arch}"
96+
buildah manifest add \
97+
"${image_name}:${tag}" \
98+
"${image_id}"
99+
done
100+
done

0 commit comments

Comments
 (0)