2022-10-30 14:44:14 +03:00
|
|
|
name: Build images
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
|
|
|
|
env:
|
|
|
|
BASE_IMAGE_NAME: openvk
|
|
|
|
DB_IMAGE_NAME: mariadb
|
|
|
|
EVENT_IMAGE_NAME: mariadb
|
|
|
|
DB_VERSION: "10.9"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
steps:
|
|
|
|
- name: Set up QEMU
|
2024-11-04 00:10:00 +03:00
|
|
|
uses: docker/setup-qemu-action@v3
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
- name: Set up Docker Buildx
|
|
|
|
id: buildx
|
2024-11-04 00:10:00 +03:00
|
|
|
uses: docker/setup-buildx-action@v3
|
2022-10-30 14:44:14 +03:00
|
|
|
|
2024-06-10 00:50:18 +03:00
|
|
|
- name: Change repository string to lowercase
|
|
|
|
id: repositorystring
|
2024-06-10 00:53:35 +03:00
|
|
|
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
2024-06-10 00:50:18 +03:00
|
|
|
with:
|
|
|
|
string: ${{ github.repository }}
|
|
|
|
|
2024-11-04 12:52:38 +03:00
|
|
|
- name: Base image meta
|
|
|
|
id: basemeta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}
|
|
|
|
tags: |
|
|
|
|
type=sha
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=ref,event=tag
|
|
|
|
type=raw,value=latest,enable={{is_default_branch}}
|
|
|
|
|
|
|
|
- name: MariaDB primary meta
|
|
|
|
id: db-primarymeta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
|
|
|
tags: |
|
|
|
|
type=sha
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=ref,event=tag
|
|
|
|
type=raw,value=,enable={{is_default_branch}}
|
|
|
|
flavor: |
|
|
|
|
latest=auto
|
|
|
|
prefix=${{env.DB_VERSION}}-primary
|
|
|
|
|
|
|
|
- name: MariaDB event meta
|
|
|
|
id: db-eventmeta
|
|
|
|
uses: docker/metadata-action@v5
|
|
|
|
with:
|
|
|
|
images: |
|
|
|
|
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
|
|
|
tags: |
|
|
|
|
type=sha
|
|
|
|
type=ref,event=branch
|
|
|
|
type=ref,event=pr
|
|
|
|
type=ref,event=tag
|
|
|
|
type=raw,value=,enable={{is_default_branch}}
|
|
|
|
flavor: |
|
|
|
|
latest=auto
|
|
|
|
prefix=${{env.DB_VERSION}}-eventdb-
|
|
|
|
|
2024-11-04 00:10:00 +03:00
|
|
|
# - name: Log into registry
|
|
|
|
# run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
- name: Build base image
|
2024-11-04 00:10:00 +03:00
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
file: install/automated/docker/openvk.Dockerfile
|
2024-11-04 12:52:38 +03:00
|
|
|
tags: ${{ steps.basemeta.outputs.tags }}
|
|
|
|
labels: ${{ steps.basemeta.outputs.labels }}
|
2024-11-04 00:10:00 +03:00
|
|
|
build-args: |
|
|
|
|
GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
- name: Build MariaDB primary image
|
2024-11-04 00:10:00 +03:00
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
file: install/automated/docker/mariadb-primary.Dockerfile
|
2024-11-04 12:52:38 +03:00
|
|
|
tags: ${{ steps.db-primarymeta.outputs.tags }}
|
|
|
|
labels: ${{ steps.db-primarymeta.outputs.labels }}
|
2024-11-04 00:10:00 +03:00
|
|
|
build-args: |
|
2024-11-04 00:16:47 +03:00
|
|
|
VERSION=${{env.DB_VERSION}}
|
2022-10-30 14:44:14 +03:00
|
|
|
|
|
|
|
- name: Build MariaDB event image
|
2024-11-04 00:10:00 +03:00
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
|
|
|
platforms: linux/amd64,linux/arm64
|
|
|
|
file: install/automated/docker/mariadb-eventdb.Dockerfile
|
2024-11-04 12:52:38 +03:00
|
|
|
tags: ${{ steps.db-eventmeta.outputs.tags }}
|
|
|
|
labels: ${{ steps.db-eventmeta.outputs.labels }}
|
2024-11-04 00:10:00 +03:00
|
|
|
build-args: |
|
2024-11-04 12:52:38 +03:00
|
|
|
VERSION=${{env.DB_VERSION}}
|