mirror of
https://github.com/openvk/openvk
synced 2024-12-23 09:01:15 +03:00
Compare commits
No commits in common. "216312e58d2936fc0d10ab4b22bcbeb07bc63209" and "9100a83044aee90822f3172b34fc11f1daa82691" have entirely different histories.
216312e58d
...
9100a83044
3 changed files with 194 additions and 446 deletions
146
.github/workflows/build.yaml
vendored
146
.github/workflows/build.yaml
vendored
|
@ -1,6 +1,14 @@
|
||||||
name: Build images
|
name: Build images
|
||||||
|
|
||||||
on: [push, pull_request]
|
on:
|
||||||
|
push:
|
||||||
|
# Publish `master` as Docker `latest` image.
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
# Publish `v1.2.3` tags as releases.
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BASE_IMAGE_NAME: openvk
|
BASE_IMAGE_NAME: openvk
|
||||||
|
@ -9,21 +17,24 @@ env:
|
||||||
DB_VERSION: "10.9"
|
DB_VERSION: "10.9"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildbase:
|
build:
|
||||||
name: Build base images
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
platform: [amd64, arm64]
|
arch: ['x86_64']
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
|
if: github.event_name == 'push'
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
lfs: false
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v2
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
id: buildx
|
id: buildx
|
||||||
uses: docker/setup-buildx-action@v3
|
uses: docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Change repository string to lowercase
|
- name: Change repository string to lowercase
|
||||||
id: repositorystring
|
id: repositorystring
|
||||||
|
@ -31,114 +42,29 @@ jobs:
|
||||||
with:
|
with:
|
||||||
string: ${{ github.repository }}
|
string: ${{ github.repository }}
|
||||||
|
|
||||||
- name: Base image meta
|
|
||||||
id: basemeta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}
|
|
||||||
labels: |
|
|
||||||
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
|
||||||
tags: |
|
|
||||||
type=sha
|
|
||||||
type=ref,event=branch
|
|
||||||
type=ref,event=pr
|
|
||||||
type=ref,event=tag
|
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||||
|
|
||||||
- name: Build base image
|
- name: Build base image
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
IMAGE_ID=ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/$BASE_IMAGE_NAME
|
||||||
platforms: linux/${{matrix.platform}}
|
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')
|
||||||
file: install/automated/docker/openvk.Dockerfile
|
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
|
||||||
tags: ${{ steps.basemeta.outputs.tags }}
|
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
|
||||||
labels: ${{ steps.basemeta.outputs.labels }}
|
[ "$VERSION" == "master" ] && VERSION=latest
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
echo IMAGE_ID=$IMAGE_ID
|
||||||
build-args: |
|
echo VERSION=$VERSION
|
||||||
GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
|
||||||
|
|
||||||
builddb:
|
docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE_ID:$VERSION . --push -f install/automated/docker/openvk.Dockerfile --build-arg GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
||||||
name: Build DB images
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [amd64, arm64]
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Set up QEMU
|
|
||||||
uses: docker/setup-qemu-action@v3
|
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
|
||||||
id: buildx
|
|
||||||
uses: docker/setup-buildx-action@v3
|
|
||||||
|
|
||||||
- name: Change repository string to lowercase
|
|
||||||
id: repositorystring
|
|
||||||
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
|
||||||
with:
|
|
||||||
string: ${{ github.repository }}
|
|
||||||
|
|
||||||
- name: MariaDB primary meta
|
|
||||||
id: db-primarymeta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
|
||||||
labels: |
|
|
||||||
org.opencontainers.image.title=OpenVK MariaDB (Primary)
|
|
||||||
org.opencontainers.image.description=OpenVK's image for MariaDB for primary database.
|
|
||||||
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
|
||||||
tags: |
|
|
||||||
type=sha,prefix=${{env.DB_VERSION}}-primary-sha-
|
|
||||||
type=ref,event=branch,prefix=${{env.DB_VERSION}}-primary-
|
|
||||||
type=ref,event=pr,prefix=${{env.DB_VERSION}}-primary-pr-
|
|
||||||
type=ref,event=tag,prefix=${{env.DB_VERSION}}-primary-
|
|
||||||
type=raw,value=${{env.DB_VERSION}}-primary,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
- name: MariaDB event meta
|
|
||||||
id: db-eventmeta
|
|
||||||
uses: docker/metadata-action@v5
|
|
||||||
with:
|
|
||||||
images: |
|
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
|
||||||
labels: |
|
|
||||||
org.opencontainers.image.title=OpenVK MariaDB (EventDB)
|
|
||||||
org.opencontainers.image.description=OpenVK's image for MariaDB for event database.
|
|
||||||
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
|
||||||
tags: |
|
|
||||||
type=sha,prefix=${{env.DB_VERSION}}-eventdb-sha-
|
|
||||||
type=ref,event=branch,prefix=${{env.DB_VERSION}}-eventdb-
|
|
||||||
type=ref,event=pr,prefix=${{env.DB_VERSION}}-eventdb-pr-
|
|
||||||
type=ref,event=tag,prefix=${{env.DB_VERSION}}-eventdb-
|
|
||||||
type=raw,value=${{env.DB_VERSION}}-eventdb,enable={{is_default_branch}}
|
|
||||||
|
|
||||||
- name: Log into registry
|
|
||||||
if: github.event_name != 'pull_request'
|
|
||||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
|
||||||
|
|
||||||
- name: Build MariaDB primary image
|
- name: Build MariaDB primary image
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
IMAGE_NAME=ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/$DB_IMAGE_NAME:$DB_VERSION-primary
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
platforms: linux/${{matrix.platform}}
|
docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE_NAME . --push -f install/automated/docker/mariadb-primary.Dockerfile --build-arg VERSION=$DB_VERSION
|
||||||
file: install/automated/docker/mariadb-primary.Dockerfile
|
|
||||||
tags: ${{ steps.db-primarymeta.outputs.tags }}
|
|
||||||
labels: ${{ steps.db-primarymeta.outputs.labels }}
|
|
||||||
build-args: |
|
|
||||||
VERSION=${{env.DB_VERSION}}
|
|
||||||
|
|
||||||
- name: Build MariaDB event image
|
- name: Build MariaDB event image
|
||||||
uses: docker/build-push-action@v6
|
run: |
|
||||||
with:
|
IMAGE_NAME=ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/$EVENT_IMAGE_NAME:$DB_VERSION-eventdb
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
|
||||||
platforms: linux/${{matrix.platform}}
|
docker buildx build --platform linux/amd64,linux/arm64 -t $IMAGE_NAME . --push -f install/automated/docker/mariadb-eventdb.Dockerfile --build-arg VERSION=$DB_VERSION
|
||||||
file: install/automated/docker/mariadb-eventdb.Dockerfile
|
|
||||||
tags: ${{ steps.db-eventmeta.outputs.tags }}
|
|
||||||
labels: ${{ steps.db-eventmeta.outputs.labels }}
|
|
||||||
build-args: |
|
|
||||||
VERSION=${{env.DB_VERSION}}
|
|
|
@ -13,7 +13,7 @@ list:
|
||||||
flag: "ua"
|
flag: "ua"
|
||||||
name: "Ukrainian"
|
name: "Ukrainian"
|
||||||
native_name: "Українcька"
|
native_name: "Українcька"
|
||||||
author: "Jaroslav (ovk.to/id6908), Andrej Lenťaj, Maxim Hrabovi (dechioyo) and Kirill (mbsoft)"
|
author: "Aqukie (yaroslav.bielograd@ukr.net), Andrej Lenťaj, Maxim Hrabovi (dechioyo) and Kirill (mbsoft)"
|
||||||
- code: "by"
|
- code: "by"
|
||||||
flag: "by"
|
flag: "by"
|
||||||
name: "Belarussian"
|
name: "Belarussian"
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue