Skip to content

Commit d0c22db

Browse files
authored
Merge pull request #84 from mbargull/bot-rebuild-2024-06
bot: Rebuild with latest versions
2 parents 98ea236 + c4fa576 commit d0c22db

File tree

2 files changed

+57
-36
lines changed

2 files changed

+57
-36
lines changed

.github/workflows/bot.yaml

+55-31
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,37 @@ jobs:
2323
packages: "anaconda-client skopeo"
2424
- tag: update
2525
packages: "git openssh"
26-
runs-on: ubuntu-22.04
26+
runs-on: ubuntu-24.04
27+
container:
28+
# travier/podman-action contains newer podman/buildah versions.
29+
image: quay.io/travier/podman-action
30+
options: --privileged
2731
env:
2832
IMAGE_NAME: bot
29-
IMAGE_VERSION: '1.3.1'
33+
IMAGE_VERSION: '1.4.0'
3034

3135
steps:
32-
- uses: actions/checkout@v2
36+
- uses: actions/checkout@v4
37+
38+
- name: Install Tools
39+
run: |
40+
set -eu
41+
# jq is not installed in travier/podman-action
42+
dnf install -qy \
43+
jq
44+
rpm -q \
45+
buildah podman \
46+
coreutils findutils sed \
47+
curl jq \
48+
| (
49+
while read -r line ; do
50+
printf %s\\n "${line}"
51+
case "${line}" in (*' not installed'*)
52+
err=1 ;;
53+
esac
54+
done
55+
exit "${err-0}"
56+
)
3357
3458
- name: Build
3559
id: buildah-build
@@ -63,35 +87,35 @@ jobs:
6387
done
6488
buildah rmi --prune || true
6589
66-
#- name: Check Tags
67-
# run: |
68-
# # FIX upstream: Quay.io does not support immutable images currently.
69-
# # => Try to use the REST API to check for duplicate tags.
70-
# respone="$(
71-
# curl -sL \
72-
# 'https://quay.io/api/v1/repository/bioconda/${{ steps.buildah-build.outputs.image }}/image'
73-
# )"
90+
- name: Check Tags
91+
run: |
92+
# FIX upstream: Quay.io does not support immutable images currently.
93+
# => Try to use the REST API to check for duplicate tags.
94+
respone="$(
95+
curl -sL \
96+
'https://quay.io/api/v1/repository/bioconda/${{ steps.buildah-build.outputs.image }}/tag/'
97+
)"
7498
75-
# existing_tags="$(
76-
# printf %s "${respone}" \
77-
# | jq -r '.images[].tags[]'
78-
# )" \
79-
# || {
80-
# printf %s\\n \
81-
# 'Could not get list of image tags.' \
82-
# 'Does the repository exist on Quay.io?' \
83-
# 'Quay.io REST API response was:' \
84-
# "${respone}"
85-
# exit 1
86-
# }
87-
# for tag in ${{ steps.buildah-build.outputs.tags }} ; do
88-
# if [ \! "${tag}" = '${{ matrix.tag }}' ] ; then
89-
# if printf %s "${existing_tags}" | grep -qxF "${tag}" ; then
90-
# printf 'Tag %s already exists!\n' "${tag}"
91-
# exit 1
92-
# fi
93-
# fi
94-
# done
99+
existing_tags="$(
100+
printf %s "${respone}" \
101+
| jq -r '.tags[]|select(.end_ts == null or .end_ts >= now)|.name'
102+
)" \
103+
|| {
104+
printf %s\\n \
105+
'Could not get list of image tags.' \
106+
'Does the repository exist on Quay.io?' \
107+
'Quay.io REST API response was:' \
108+
"${respone}"
109+
exit 1
110+
}
111+
for tag in ${{ steps.buildah-build.outputs.tags }} ; do
112+
if [ \! "${tag}" = '${{ matrix.tag }}' ] ; then
113+
if printf %s "${existing_tags}" | grep -qxF "${tag}" ; then
114+
printf 'Tag %s already exists!\n' "${tag}"
115+
exit 1
116+
fi
117+
fi
118+
done
95119
96120
- if: ${{ github.ref == 'refs/heads/main' }}
97121
name: Push

images/bot/Dockerfile

+2-5
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG base=quay.io/bioconda/base-glibc-busybox-bash:2.1.0
1+
ARG base=quay.io/bioconda/base-glibc-busybox-bash:latest
22

33
FROM quay.io/bioconda/create-env as build
44
## If gettext pulls in libxml2, use one that doesn't bloat the image with ICU.
@@ -18,13 +18,11 @@ FROM quay.io/bioconda/create-env as build
1818
# && \
1919
# conda-build -m .ci_support/linux_64_.yaml recipe/
2020
ARG packages=
21-
ARG python=3.8
2221
ARG prefix=/usr/local
2322
RUN . /opt/create-env/env-activate.sh && \
2423
export CONDA_ADD_PIP_AS_PYTHON_DEPENDENCY=0 \
2524
&& \
2625
create-env \
27-
--conda=mamba \
2826
--strip-files=\* \
2927
--remove-paths=\*.a \
3028
--remove-paths=\*.c \
@@ -43,10 +41,9 @@ RUN . /opt/create-env/env-activate.sh && \
4341
--channel=conda-forge \
4442
--override-channels \
4543
pip wheel setuptools \
46-
python="${python}" \
44+
python\>=3.8 \
4745
aiohttp \
4846
ca-certificates \
49-
idna\<3 \
5047
pyyaml \
5148
${packages} \
5249
&& \

0 commit comments

Comments
 (0)