Add mariadb
This commit is contained in:
parent
f618d06a30
commit
a7c6874af4
2 changed files with 85 additions and 0 deletions
72
.github/workflows/mariadb.yml
vendored
Normal file
72
.github/workflows/mariadb.yml
vendored
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
name: MariaDB w/Healthcheck
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- mariadb/**
|
||||
- .github/workflows/mariadb.yml
|
||||
|
||||
env:
|
||||
should_push: ${{ github.ref == 'refs/heads/main' }}
|
||||
|
||||
jobs:
|
||||
mariadb-build:
|
||||
name: "Build"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version:
|
||||
- latest
|
||||
- 11
|
||||
- 11.2
|
||||
- 11.1
|
||||
- 11.0
|
||||
- 10.11
|
||||
- 10.10
|
||||
- 10.6
|
||||
- 10.5
|
||||
- 10.4
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- uses: docker/setup-qemu-action@v2
|
||||
|
||||
- uses: docker/setup-buildx-action@v2
|
||||
|
||||
- name: "Setup: Login to Docker Hub"
|
||||
if: ${{ env.should_push }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: matthewbaggett
|
||||
password: ${{ secrets.DOCKER_HUB_PASSWORD }}
|
||||
|
||||
- name: "Setup: Login to GHCR"
|
||||
if: ${{ env.should_push }}
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: matthewbaggett
|
||||
password: ${{ secrets.GHCR_PASSWORD }}
|
||||
|
||||
- uses: docker/build-push-action@v4
|
||||
name: Build & Push
|
||||
with:
|
||||
context: mariadb
|
||||
platforms: linux/amd64,linux/arm64
|
||||
pull: true
|
||||
push: ${{ env.should_push && !env.ACT }}
|
||||
tags: |
|
||||
benzine/mariadb:${{ matrix.version }}
|
||||
ghcr.io/benzine-framework/mariadb:${{ matrix.version }}
|
||||
build-contexts: |
|
||||
mariadb:injected-version=docker-image://mariadb:${{ matrix.version }}
|
||||
13
mariadb/Dockerfile
Normal file
13
mariadb/Dockerfile
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
FROM mariadb:injected-version
|
||||
|
||||
LABEL maintainer="Matthew Baggett <matthew@baggett.me>" \
|
||||
org.label-schema.vcs-url="https://github.com/benzine-framework/docker" \
|
||||
org.opencontainers.image.source="https://github.com/benzine-framework/docker"
|
||||
|
||||
# If healthcheck.sh isn't baked into the underlying image, crash.
|
||||
RUN which healthcheck.sh
|
||||
|
||||
# Add healthcheck
|
||||
HEALTHCHECK --interval=10s --timeout=30s --retries=3 \
|
||||
CMD ["healthcheck.sh", "--su-mysql", "--connect", "--innodb_initialized"]
|
||||
|
||||
Loading…
Reference in a new issue