-
Notifications
You must be signed in to change notification settings - Fork 91
91 lines (82 loc) · 2.62 KB
/
build-mongodb-images.yaml
File metadata and controls
91 lines (82 loc) · 2.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
---
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 }}