Skip to content

Docker Image MariaDB #3

Docker Image MariaDB

Docker Image MariaDB #3

name: Docker Image MariaDB
on:
workflow_dispatch:
schedule:
- cron: "0 6 * * *" # 6 AM Daily
push:
paths:
- .trigger
- mariadb/**
- .github/workflows/*mariadb*
jobs:
mariadb:
name: MariaDB
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
version:
- "11.3"
include:
- version: "11.4"
modifier: "-rc"
steps:
- uses: actions/checkout@v4
- uses: docker/setup-qemu-action@v3
- uses: docker/setup-buildx-action@v3
- name: Login to Github Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
if: ${{ !env.ACT }}
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
if: ${{ !env.ACT }}
- uses: docker/build-push-action@v5
with:
context: mariadb
platforms: linux/amd64,linux/arm64
build-args: MARIADB_VERSION=${{ matrix.version }}${{ matrix.modifier }}
push: ${{ github.ref == 'refs/heads/master' && !env.ACT }}
tags: ghcr.io/${{ github.repository_owner }}/mariadb:${{ matrix.version }}${{ matrix.modifier }}
if: ${{ !env.ACT && github.ref == 'refs/heads/master'}}