Skip to content

feat: download official MongoDB binaries from fastdl.mongodb.org #3

feat: download official MongoDB binaries from fastdl.mongodb.org

feat: download official MongoDB binaries from fastdl.mongodb.org #3

---
name: build-mongodb-images
on:
push:
branches:
- 'development/**'
- 'feature/**'
- 'improvement/**'
- 'w/**'
- main
paths:
- 'solution-base/images/mongodb-sharded/**'
- '.github/workflows/build-mongodb-images.yaml'
workflow_dispatch:
inputs:
force_rebuild:
description: 'Force rebuild all images'
required: false
default: false
type: boolean
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
jobs:
build-mongodb-sharded:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
include:
- name: mongodb-sharded-8.0
context: solution-base/images/mongodb-sharded/8.0/debian-12
image: scality/zenko/mongodb-sharded
semver_tag: "8.0.13"
minor_tag: "8.0"
- name: mongodb-sharded-8.2
context: solution-base/images/mongodb-sharded/8.2/debian-12
image: scality/zenko/mongodb-sharded
semver_tag: "8.2.6"
minor_tag: "8.2"
- name: mongodb-exporter
context: solution-base/images/mongodb-sharded/mongodb-exporter/0/debian-12
image: scality/zenko/mongodb-exporter
semver_tag: "0.49.0"
minor_tag: ""
- name: os-shell
context: solution-base/images/mongodb-sharded/os-shell/12/debian-12
image: scality/zenko/os-shell
semver_tag: "12"
minor_tag: ""
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build tags
id: tags
run: |
TAGS="${{ env.REGISTRY }}/${{ matrix.image }}:${{ matrix.semver_tag }}"
if [[ -n "${{ matrix.minor_tag }}" ]]; then
TAGS="${TAGS},${{ env.REGISTRY }}/${{ matrix.image }}:${{ matrix.minor_tag }}"
fi
echo "tags=${TAGS}" >> "$GITHUB_OUTPUT"
- name: Build and push (${{ matrix.name }})
uses: docker/build-push-action@v5
with:
context: ${{ matrix.context }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.tags.outputs.tags }}
cache-from: type=gha,scope=${{ matrix.name }}
cache-to: type=gha,mode=max,scope=${{ matrix.name }}