mirror of
https://github.com/openvk/openvk
synced 2025-01-31 03:55:27 +03:00
ci(actions): unparallel builds (#1217)
this should fix linux/amd64 showing up as unknown/unknown on ghcr
This commit is contained in:
parent
b713c964a3
commit
7fe0c6a122
1 changed files with 122 additions and 124 deletions
238
.github/workflows/build.yaml
vendored
238
.github/workflows/build.yaml
vendored
|
@ -3,142 +3,140 @@ name: Build images
|
||||||
on: [push, pull_request]
|
on: [push, pull_request]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
BASE_IMAGE_NAME: openvk
|
BASE_IMAGE_NAME: openvk
|
||||||
DB_IMAGE_NAME: mariadb
|
DB_IMAGE_NAME: mariadb
|
||||||
EVENT_IMAGE_NAME: mariadb
|
EVENT_IMAGE_NAME: mariadb
|
||||||
DB_VERSION: "10.9"
|
DB_VERSION: '10.9'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
buildbase:
|
buildbase:
|
||||||
name: Build base images
|
name: Build base images
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [amd64, arm64]
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- 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@v3
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
- name: Change repository string to lowercase
|
- name: Change repository string to lowercase
|
||||||
id: repositorystring
|
id: repositorystring
|
||||||
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
||||||
with:
|
with:
|
||||||
string: ${{ github.repository }}
|
string: ${{ github.repository }}
|
||||||
|
|
||||||
- name: Base image meta
|
- name: Base image meta
|
||||||
id: basemeta
|
id: basemeta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}
|
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.BASE_IMAGE_NAME}}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
||||||
tags: |
|
tags: |
|
||||||
type=sha
|
type=sha
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=pr
|
type=ref,event=pr
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
type=raw,value=latest,enable={{is_default_branch}}
|
type=raw,value=latest,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
if: github.event_name != 'pull_request'
|
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
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
platforms: linux/${{matrix.platform}}
|
platforms: linux/amd64,linux/arm64
|
||||||
file: install/automated/docker/openvk.Dockerfile
|
file: install/automated/docker/openvk.Dockerfile
|
||||||
tags: ${{ steps.basemeta.outputs.tags }}
|
tags: ${{ steps.basemeta.outputs.tags }}
|
||||||
labels: ${{ steps.basemeta.outputs.labels }}
|
labels: ${{ steps.basemeta.outputs.labels }}
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
build-args: |
|
build-args: |
|
||||||
GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
GITREPO=${{ steps.repositorystring.outputs.lowercase }}
|
||||||
|
|
||||||
builddb:
|
builddb:
|
||||||
name: Build DB images
|
name: Build DB images
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
platform: [amd64, arm64]
|
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@v3
|
uses: docker/setup-qemu-action@v3
|
||||||
|
|
||||||
- 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@v3
|
||||||
|
with:
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
|
||||||
- name: Change repository string to lowercase
|
- name: Change repository string to lowercase
|
||||||
id: repositorystring
|
id: repositorystring
|
||||||
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
uses: Entepotenz/change-string-case-action-min-dependencies@v1.1.0
|
||||||
with:
|
with:
|
||||||
string: ${{ github.repository }}
|
string: ${{ github.repository }}
|
||||||
|
|
||||||
- name: MariaDB primary meta
|
- name: MariaDB primary meta
|
||||||
id: db-primarymeta
|
id: db-primarymeta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.title=OpenVK MariaDB (Primary)
|
org.opencontainers.image.title=OpenVK MariaDB (Primary)
|
||||||
org.opencontainers.image.description=OpenVK's image for MariaDB for primary database.
|
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
|
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
||||||
tags: |
|
tags: |
|
||||||
type=sha,prefix=${{env.DB_VERSION}}-primary-sha-
|
type=sha,prefix=${{env.DB_VERSION}}-primary-sha-
|
||||||
type=ref,event=branch,prefix=${{env.DB_VERSION}}-primary-
|
type=ref,event=branch,prefix=${{env.DB_VERSION}}-primary-
|
||||||
type=ref,event=pr,prefix=${{env.DB_VERSION}}-primary-pr-
|
type=ref,event=pr,prefix=${{env.DB_VERSION}}-primary-pr-
|
||||||
type=ref,event=tag,prefix=${{env.DB_VERSION}}-primary-
|
type=ref,event=tag,prefix=${{env.DB_VERSION}}-primary-
|
||||||
type=raw,value=${{env.DB_VERSION}}-primary,enable={{is_default_branch}}
|
type=raw,value=${{env.DB_VERSION}}-primary,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: MariaDB event meta
|
- name: MariaDB event meta
|
||||||
id: db-eventmeta
|
id: db-eventmeta
|
||||||
uses: docker/metadata-action@v5
|
uses: docker/metadata-action@v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
ghcr.io/${{ steps.repositorystring.outputs.lowercase }}/${{env.DB_IMAGE_NAME}}
|
||||||
labels: |
|
labels: |
|
||||||
org.opencontainers.image.title=OpenVK MariaDB (EventDB)
|
org.opencontainers.image.title=OpenVK MariaDB (EventDB)
|
||||||
org.opencontainers.image.description=OpenVK's image for MariaDB for event database.
|
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
|
org.opencontainers.image.documentation=https://github.com/OpenVK/openvk/blob/master/install/automated/docker/Readme.md
|
||||||
tags: |
|
tags: |
|
||||||
type=sha,prefix=${{env.DB_VERSION}}-eventdb-sha-
|
type=sha,prefix=${{env.DB_VERSION}}-eventdb-sha-
|
||||||
type=ref,event=branch,prefix=${{env.DB_VERSION}}-eventdb-
|
type=ref,event=branch,prefix=${{env.DB_VERSION}}-eventdb-
|
||||||
type=ref,event=pr,prefix=${{env.DB_VERSION}}-eventdb-pr-
|
type=ref,event=pr,prefix=${{env.DB_VERSION}}-eventdb-pr-
|
||||||
type=ref,event=tag,prefix=${{env.DB_VERSION}}-eventdb-
|
type=ref,event=tag,prefix=${{env.DB_VERSION}}-eventdb-
|
||||||
type=raw,value=${{env.DB_VERSION}}-eventdb,enable={{is_default_branch}}
|
type=raw,value=${{env.DB_VERSION}}-eventdb,enable={{is_default_branch}}
|
||||||
|
|
||||||
- name: Log into registry
|
- name: Log into registry
|
||||||
if: github.event_name != 'pull_request'
|
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 MariaDB primary image
|
- name: Build MariaDB primary image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
platforms: linux/${{matrix.platform}}
|
platforms: linux/amd64,linux/arm64
|
||||||
file: install/automated/docker/mariadb-primary.Dockerfile
|
file: install/automated/docker/mariadb-primary.Dockerfile
|
||||||
tags: ${{ steps.db-primarymeta.outputs.tags }}
|
tags: ${{ steps.db-primarymeta.outputs.tags }}
|
||||||
labels: ${{ steps.db-primarymeta.outputs.labels }}
|
labels: ${{ steps.db-primarymeta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{env.DB_VERSION}}
|
VERSION=${{env.DB_VERSION}}
|
||||||
|
|
||||||
- name: Build MariaDB event image
|
- name: Build MariaDB event image
|
||||||
uses: docker/build-push-action@v6
|
uses: docker/build-push-action@v6
|
||||||
with:
|
with:
|
||||||
push: ${{ github.event_name != 'pull_request' }}
|
push: ${{ github.event_name != 'pull_request' }}
|
||||||
platforms: linux/${{matrix.platform}}
|
platforms: linux/amd64,linux/arm64
|
||||||
file: install/automated/docker/mariadb-eventdb.Dockerfile
|
file: install/automated/docker/mariadb-eventdb.Dockerfile
|
||||||
tags: ${{ steps.db-eventmeta.outputs.tags }}
|
tags: ${{ steps.db-eventmeta.outputs.tags }}
|
||||||
labels: ${{ steps.db-eventmeta.outputs.labels }}
|
labels: ${{ steps.db-eventmeta.outputs.labels }}
|
||||||
build-args: |
|
build-args: |
|
||||||
VERSION=${{env.DB_VERSION}}
|
VERSION=${{env.DB_VERSION}}
|
||||||
|
|
Loading…
Reference in a new issue