Skip to content

Commit

Permalink
Add a CI job to build a Docker manifest
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g committed Nov 29, 2023
1 parent 6dcacf9 commit b08c06c
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 4 deletions.
50 changes: 46 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -260,10 +260,52 @@ jobs:
run: |
./.circleci/run_docker_build.sh
- name: Deploy
if: github.ref == 'refs/heads/main' && github.repository == 'conda-forge/docker-images'
- name: Deploy images
# if: github.ref == 'refs/heads/main' && github.repository == 'conda-forge/docker-images'
env:
CFD_QUAY_USER: ${{ secrets.CFD_QUAY_USER }}
CFD_QUAY_PASSWORD: ${{ secrets.CFD_QUAY_PASSWORD }}
DH_PASSWORD: ${{ secrets.DH_PASSWORD }}
# DH_PASSWORD: ${{ secrets.DH_PASSWORD }}
DH_USER: ${{ secrets.DOCKER_HUB_USER }}
DH_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWD }}
run: |
./scripts/deploy
./scripts/deploy-mgrigorov
build-manifest:
needs: [build]
name: ${{ matrix.cfg.DOCKER_MANIFEST }}:${{ matrix.cfg.DOCKER_TAG }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cfg:
- DOCKER_MANIFEST: condaforge/linux-anvil-cos7
DOCKER_TAG: "latest"
DOCKER_IMAGES: condaforge/linux-anvil-cos7-x86_64:latest,condaforge/linux-anvil-ppc64le:latest,condaforge/linux-anvil-aarch64:latest

- DOCKER_MANIFEST: condaforge/linux-anvil-alma
DOCKER_TAG: "8"
DOCKER_IMAGES: condaforge/linux-anvil-alma-x86_64:8,condaforge/linux-anvil-alma-ppc64le:8,condaforge/linux-anvil-alma-aarch64:8

steps:

- name: Create Docker manifests
uses: Noelware/[email protected]
with:
inputs: ${{ matrix.cfg.DOCKER_MANIFEST }}:${{ matrix.cfg.DOCKER_TAG }}
images: ${{ matrix.cfg.DOCKER_IMAGES }}
push: false

- name: Deploy manifests
# if: github.ref == 'refs/heads/main' && github.repository == 'conda-forge/docker-images'
env:
CFD_QUAY_USER: ${{ secrets.CFD_QUAY_USER }}
CFD_QUAY_PASSWORD: ${{ secrets.CFD_QUAY_PASSWORD }}
# DH_PASSWORD: ${{ secrets.DH_PASSWORD }}
DH_USER: ${{ secrets.DOCKER_HUB_USER }}
DH_PASSWORD: ${{ secrets.DOCKER_HUB_PASSWD }}
DOCKERIMAGE: ${{ matrix.cfg.DOCKER_MANIFEST }}
DOCKERTAG: ${{ matrix.cfg.DOCKER_TAG }}
run: |
./scripts/deploy-mgrigorov
15 changes: 15 additions & 0 deletions scripts/deploy-mgrigorov
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

set -xe

docker images

# dockerhub
echo ${DH_PASSWORD} | docker login -u ${DH_USER} --password-stdin
docker tag condaforge/${DOCKERIMAGE}:${DOCKERTAG} mtgrigorov/${DOCKERIMAGE}:${DOCKERTAG}
docker push mgrigorov/${DOCKERIMAGE}:${DOCKERTAG}

# quay.io
echo ${CFD_QUAY_PASSWORD} | docker login -u ${CFD_QUAY_USER} --password-stdin quay.io
docker tag condaforge/${DOCKERIMAGE}:${DOCKERTAG} quay.io/mgrigorov/${DOCKERIMAGE}:${DOCKERTAG}
docker push quay.io/mgrigorov/${DOCKERIMAGE}:${DOCKERTAG}

0 comments on commit b08c06c

Please sign in to comment.