Skip to content

Commit b7104d2

Browse files
committed
handle "master" and "latest" tags in appropriate workflows
1 parent 9bd8ee2 commit b7104d2

File tree

2 files changed

+17
-53
lines changed

2 files changed

+17
-53
lines changed

.github/workflows/build-images.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,11 @@ jobs:
288288
build_and_push_manifest ${CREATE_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG} "quay.io/bioconda/${CREATE_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}"
289289
ONLY_AMD64=true build_and_push_manifest ${BOT_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG} "quay.io/bioconda/${BOT_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}"
290290
291-
# Same thing, but push as "latest" tag.
292-
build_and_push_manifest ${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG} "quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:latest"
293-
build_and_push_manifest ${BASE_DEBIAN_IMAGE_NAME}:${BASE_TAG} "quay.io/bioconda/${BASE_DEBIAN_IMAGE_NAME}:latest"
294-
build_and_push_manifest ${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG} "quay.io/bioconda/${BUILD_ENV_IMAGE_NAME}:latest"
295-
build_and_push_manifest ${CREATE_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG} "quay.io/bioconda/${CREATE_ENV_IMAGE_NAME}:latest"
296-
ONLY_AMD64=true build_and_push_manifest ${BOT_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG} "quay.io/bioconda/${BOT_IMAGE_NAME}:latest"
291+
# Now that they are pushed, we can make tags pointing to them. Note
292+
# that the "latest" tag will not be applied unil release time (via
293+
# release-please workflow).
294+
podman tag "quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:${BASE_TAG}" "quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:master"
295+
podman tag "quay.io/bioconda/${BASE_DEBIAN_IMAGE_NAME}:${BASE_TAG}" "quay.io/bioconda/${BASE_DEBIAN_IMAGE_NAME}:master"
296+
podman tag "quay.io/bioconda/${BUILD_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}" "quay.io/bioconda${BUILD_ENV_IMAGE_NAME}::master"
297+
podman tag "quay.io/bioconda/${CREATE_ENV_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}" "quay.io/bioconda/${CREATE_ENV_IMAGE_NAME}:master"
298+
podman tag "quay.io/bioconda/${BOT_IMAGE_NAME}:${BIOCONDA_IMAGE_TAG}" "quay.io/bioconda/${BOT_IMAGE_NAME}:master"

.github/workflows/release-please.yml

Lines changed: 9 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -32,54 +32,16 @@ jobs:
3232
#tag=${{ github.event.release && github.event.release.tag_name || github.sha }}
3333
tag=${{ needs.release_please.outputs.tag_name }}
3434
printf %s "tag=${tag#v}" >> $GITHUB_OUTPUT
35-
36-
- name: Install qemu dependency
35+
36+
- name: tag images with latest
3737
run: |
38-
sudo apt-get update
39-
sudo apt-get install -y qemu-user-static
40-
41-
- name: Build x86_64 Image
42-
id: buildah-build
43-
uses: redhat-actions/buildah-build@v2
44-
with:
45-
image: bioconda-utils-build-env-cos7
46-
arch: amd64
47-
build-args: |
48-
BASE_IMAGE=quay.io/condaforge/linux-anvil-cos7-x86_64
49-
tags: >-
50-
latest
51-
${{ steps.get-tag.outputs.tag }}
52-
dockerfiles: |
53-
./Dockerfile
5438
55-
- name: Push To Quay
56-
uses: redhat-actions/push-to-registry@v2
57-
with:
58-
image: ${{ steps.buildah-build.outputs.image }}
59-
tags: ${{ steps.buildah-build.outputs.tags }}
60-
registry: ${{ secrets.QUAY_BIOCONDA_REPO }}
61-
username: ${{ secrets.QUAY_BIOCONDA_USERNAME }}
62-
password: ${{ secrets.QUAY_BIOCONDA_TOKEN }}
39+
echo '${{ secrets.QUAY_BIOCONDA_TOKEN }}' | podman login quay.io -u '${{ secrets.QUAY_BIOCONDA_USERNAME }}' --password-stdin
6340
64-
- name: Build ARM Image
65-
id: buildah-build-arm
66-
uses: redhat-actions/buildah-build@v2
67-
with:
68-
image: bioconda-utils-build-env-cos7-aarch64
69-
arch: arm64
70-
build-args: |
71-
BASE_IMAGE=quay.io/condaforge/linux-anvil-aarch64
72-
tags: >-
73-
latest
74-
${{ steps.get-tag.outputs.tag }}
75-
dockerfiles: |
76-
./Dockerfile
41+
source images/image_config.sh
42+
podman tag "quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:master" "quay.io/bioconda/${BASE_BUSYBOX_IMAGE_NAME}:latest"
43+
podman tag "quay.io/bioconda/${BASE_DEBIAN_IMAGE_NAME}:master" "quay.io/bioconda/${BASE_DEBIAN_IMAGE_NAME}:latest"
44+
podman tag "quay.io/bioconda/${BUILD_ENV_IMAGE_NAME}:master" "quay.io/bioconda${BUILD_ENV_IMAGE_NAME}:latest"
45+
podman tag "quay.io/bioconda/${CREATE_ENV_IMAGE_NAME}:master" "quay.io/bioconda/${CREATE_ENV_IMAGE_NAME}:latest"
46+
podman tag "quay.io/bioconda/${BOT_IMAGE_NAME}:master" "quay.io/bioconda/${BOT_IMAGE_NAME}:latest"
7747
78-
- name: Push To Quay
79-
uses: redhat-actions/push-to-registry@v2
80-
with:
81-
image: ${{ steps.buildah-build-arm.outputs.image }}
82-
tags: ${{ steps.buildah-build-arm.outputs.tags }}
83-
registry: ${{ secrets.QUAY_BIOCONDA_REPO }}
84-
username: ${{ secrets.QUAY_BIOCONDA_USERNAME }}
85-
password: ${{ secrets.QUAY_BIOCONDA_TOKEN }}

0 commit comments

Comments
 (0)