Skip to content

Docker Image CI

Docker Image CI #4

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- mongo_version: 6.0.9
platforms: |-
linux/amd64
- mongo_version: 5.0.20
platforms: |-
linux/amd64
linux/arm64
steps:
- uses: actions/checkout@v3
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
- name: Login to Docker registry
uses: docker/[email protected]
with:
username: ${{ secrets.DOCKER_HUB_USER }}
password: ${{ secrets.DOCKER_HUB_TOKEN }}
- name: cleanup local FS before build
run: |
# Workaround to provide additional free space for testing.
# https://github.com/actions/virtual-environments/issues/2840
sudo rm -rf /swapfile /usr/share/dotnet /usr/local/lib/android /opt/ghc /usr/local/share/boost
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
- name: Build and push ${{ matrix.mongo_version }}
uses: docker/[email protected]
with:
context: .
file: Dockerfile
platforms: ${{ matrix.platforms }}
build-args: |
NUM_JOBS=2
MONGO_VERSION=${{ matrix.mongo_version }}
push: true
tags: ${{ secrets.DOCKER_HUB_USER }}/mongo-wo-avx:${{ matrix.mongo_version }}
labels: |
maintainer=${{ github.repository_owner }}
org.opencontainers.image.vendor=${{ github.repository_owner }}
org.opencontainers.image.revision=${{ github.sha }}