56
56
debian_version='${{ inputs.debian_version }}'
57
57
busybox_version='${{ inputs.busybox_version }}'
58
58
archs='${{ inputs.archs }}'
59
+ bioconda_utils='${{ inputs.bioconda_utils }}'
59
60
60
61
# Adds image and tags to outputs which can be used in later steps.
61
62
printf %s\\n \
80
81
BUILD_ARGS+="--build-arg=debian_version=$debian_version"
81
82
fi
82
83
83
- if [ '${{ inputs. bioconda_utils }}' ]; then
84
+ if [ ! -z "${ bioconda_utils}" ]; then
84
85
# Due to different nomenclature used by conda-forge and buildah, we
85
86
# need to map archs to base images.
86
87
archs_and_images='
93
94
if [ ! -z "${busybox_version}" ]; then
94
95
BUILD_ARGS+="--build-arg=busybox_version=$busybox_version"
95
96
96
- # Make a busybox image that we'll use further below.
97
+ # Make a busybox image that we'll use further below. As shown in the
98
+ # Dockerfile.busybox, this uses the build-busybox script which in turn
99
+ # cross-compiles for x86_64 and aarch64, and these are later copied
100
+ # into an arch-specific container.
97
101
# --iidfile prints the built image ID to the specified file so we can
98
102
# refer to the image later
99
103
iidfile="$( mktemp )"
@@ -128,38 +132,37 @@ jobs:
128
132
image_id="$( cat "${iidfile}" )"
129
133
rm "${iidfile}"
130
134
131
- # Extract various package info and version info...
135
+ # Extract various package info and version info, then store that info as labels
132
136
container="$( buildah from "${image_id}" )"
133
137
run() { buildah run "${container}" "${@}" ; }
134
-
135
- # Incrementally make labels
136
-
137
138
deb_list="$( run cat /.deb.lst | tr '\n' '|' | sed 's/|$//' )"
138
-
139
139
pkg_list="$( run cat /.pkg.lst | tr '\n' '|' | sed 's/|$//' )"
140
140
glibc="$( run sh -c 'exec "$( find -xdev -name libc.so.6 -print -quit )"' | sed '1!d' )"
141
141
debian="$( run cat /etc/debian_version | sed '1!d' )"
142
142
bash="$( run bash --version | sed '1!d' )"
143
143
144
- buildah rm "${container}"
145
-
146
- LABELS=""
147
- LABELS+="--label=deb-list=${deb_list} "
148
- LABELS+="--label=pkg-list=${pkg_list} "
149
- LABELS+="--label=glibc=${glibc} "
150
- LABELS+="--label=debian=${debian} "
151
- LABELS+="--label=bash=${bash} "
152
- if [ '${{ inputs.bioconda_utils }}' ]; then
144
+ if [ ! -z "${bioconda_utils}" ]; then
153
145
bioconda_utils="$(
154
146
run sh -c '. /opt/conda/etc/profile.d/conda.sh && conda activate base && bioconda-utils --version' \
155
147
| rev | cut -f1 -d " " | rev
156
148
)"
157
- LABELS+=" --label=bioconda-utils=${bioconda_utils} "
149
+ buildah config --label=bioconda-utils=" ${bioconda_utils}" ${container}
158
150
fi
159
151
160
- # ...then store that info as labels for the image
152
+ if [ ! -z "${busybox_version}" ]; then
153
+ buildah config --label=busybox-version="${busybox_version}"
154
+ fi
155
+
156
+
157
+ buildah rm "${container}"
161
158
container="$( buildah from "${image_id}" )"
162
- buildah config $LABELS "${container}"
159
+ buildah config \
160
+ --label=glibc="${glibc}" \
161
+ --label=debian="${debian}" \
162
+ --label=bash="${bash}" \
163
+ --label=deb-list="${deb_list}" \
164
+ --label=pkg-list="${pkg_list}" \
165
+ "${container}"
163
166
164
167
# Store the new image (now with labels)
165
168
image_id="$( buildah commit "${container}" )"
@@ -173,8 +176,11 @@ jobs:
173
176
buildah manifest add \
174
177
"${image_name}:${tag}" \
175
178
"${image_id}"
179
+
180
+ buildah inspect -t image ${image_name}:${tag}
176
181
done
177
182
done
183
+ buidah_inspect -t manifest ${image_name}
178
184
179
185
- name : Test
180
186
run : |
0 commit comments